soc: stm32: convert to use DEVICE_DT_GET for clocks
Convert from device_get_binding to DEVICE_DT_GET. In doing this we no longer need the label in the devicetree node so we remove that. Removed all __ASSERT_NO_MSG(clk) since we'll get a build error if DEVICE_DT_GET cant be satisfied, and the clock control api's will handle reporting if the device_is_ready. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
ca5272f239
commit
b275fec8c4
40 changed files with 44 additions and 89 deletions
|
@ -100,8 +100,7 @@ static int i2s_stm32_enable_clock(const struct device *dev)
|
|||
const struct device *clk;
|
||||
int ret;
|
||||
|
||||
clk = device_get_binding(STM32_CLOCK_CONTROL_NAME);
|
||||
__ASSERT_NO_MSG(clk);
|
||||
clk = DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE);
|
||||
|
||||
ret = clock_control_on(clk, (clock_control_subsys_t *) &cfg->pclken);
|
||||
if (ret != 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue