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:
Kumar Gala 2021-02-11 11:49:24 -06:00 committed by Kumar Gala
commit b275fec8c4
40 changed files with 44 additions and 89 deletions

View file

@ -470,10 +470,7 @@ static int uart_stm32_err_check(const struct device *dev)
static inline void __uart_stm32_get_clock(const struct device *dev)
{
struct uart_stm32_data *data = DEV_DATA(dev);
const struct device *clk =
device_get_binding(STM32_CLOCK_CONTROL_NAME);
__ASSERT_NO_MSG(clk);
const struct device *clk = DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE);
data->clock = clk;
}