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:
parent
534177b2ca
commit
3af832868c
10 changed files with 12 additions and 21 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue