drivers: npcx: convert NPCX drivers clock client to DEVICE_DT_GET

Convert the various device_get_binding() calls used to get the device
clock node to use DEVICE_DT_GET. The latter is processed at link time,
so it should be a bit more efficient.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
Fabio Baltieri 2021-06-25 15:56:58 +00:00 committed by Anas Nashif
commit 3af832868c
10 changed files with 12 additions and 21 deletions

View file

@ -357,8 +357,7 @@ static int uart_npcx_init(const struct device *dev)
const struct uart_npcx_config *const config = DRV_CONFIG(dev);
struct uart_npcx_data *const data = DRV_DATA(dev);
struct uart_reg *const inst = HAL_INSTANCE(dev);
const struct device *const clk_dev =
device_get_binding(NPCX_CLK_CTRL_NAME);
const struct device *const clk_dev = DEVICE_DT_GET(NPCX_CLK_CTRL_NODE);
uint32_t uart_rate;
int ret;