From adad8086a8dc6f6db072aaeb9d77fa6c68c9a47c Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Fri, 10 Apr 2020 05:53:25 -0500 Subject: [PATCH] drivers: i2c: i2c_sam_twihs: replace DT_I2C_._NAME with new macros Replace DT_I2C_._NAME macro with DT_LABEL(DT_NODELABEL()) instead. This will allow us to remove all references to DT_I2C_._NAME. Signed-off-by: Kumar Gala --- drivers/i2c/i2c_sam_twihs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/i2c_sam_twihs.c b/drivers/i2c/i2c_sam_twihs.c index 320232999df..bb4e814649d 100644 --- a/drivers/i2c/i2c_sam_twihs.c +++ b/drivers/i2c/i2c_sam_twihs.c @@ -348,7 +348,8 @@ static const struct i2c_sam_twihs_dev_cfg i2c0_sam_config = { static struct i2c_sam_twihs_dev_data i2c0_sam_data; -DEVICE_AND_API_INIT(i2c0_sam, DT_I2C_0_NAME, &i2c_sam_twihs_initialize, +DEVICE_AND_API_INIT(i2c0_sam, DT_LABEL(DT_NODELABEL(twihs0)), + &i2c_sam_twihs_initialize, &i2c0_sam_data, &i2c0_sam_config, POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, &i2c_sam_twihs_driver_api); #endif @@ -378,7 +379,8 @@ static const struct i2c_sam_twihs_dev_cfg i2c1_sam_config = { static struct i2c_sam_twihs_dev_data i2c1_sam_data; -DEVICE_AND_API_INIT(i2c1_sam, DT_I2C_1_NAME, &i2c_sam_twihs_initialize, +DEVICE_AND_API_INIT(i2c1_sam, DT_LABEL(DT_NODELABEL(twihs1)), + &i2c_sam_twihs_initialize, &i2c1_sam_data, &i2c1_sam_config, POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, &i2c_sam_twihs_driver_api); #endif @@ -408,7 +410,8 @@ static const struct i2c_sam_twihs_dev_cfg i2c2_sam_config = { static struct i2c_sam_twihs_dev_data i2c2_sam_data; -DEVICE_AND_API_INIT(i2c2_sam, DT_I2C_2_NAME, &i2c_sam_twihs_initialize, +DEVICE_AND_API_INIT(i2c2_sam, DT_LABEL(DT_NODELABEL(twihs2)), + &i2c_sam_twihs_initialize, &i2c2_sam_data, &i2c2_sam_config, POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, &i2c_sam_twihs_driver_api); #endif