drivers: i2c: i2c_sam_twi: 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 <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-04-10 05:52:51 -05:00 committed by Kumar Gala
commit 0a408785ac

View file

@ -361,7 +361,8 @@ static const struct i2c_sam_twi_dev_cfg i2c0_sam_config = {
static struct i2c_sam_twi_dev_data i2c0_sam_data;
DEVICE_AND_API_INIT(i2c0_sam, DT_I2C_0_NAME, &i2c_sam_twi_initialize,
DEVICE_AND_API_INIT(i2c0_sam, DT_LABEL(DT_NODELABEL(twi0)),
&i2c_sam_twi_initialize,
&i2c0_sam_data, &i2c0_sam_config, POST_KERNEL,
CONFIG_I2C_INIT_PRIORITY, &i2c_sam_twi_driver_api);
#endif
@ -391,7 +392,8 @@ static const struct i2c_sam_twi_dev_cfg i2c1_sam_config = {
static struct i2c_sam_twi_dev_data i2c1_sam_data;
DEVICE_AND_API_INIT(i2c1_sam, DT_I2C_1_NAME, &i2c_sam_twi_initialize,
DEVICE_AND_API_INIT(i2c1_sam, DT_LABEL(DT_NODELABEL(twi1)),
&i2c_sam_twi_initialize,
&i2c1_sam_data, &i2c1_sam_config, POST_KERNEL,
CONFIG_I2C_INIT_PRIORITY, &i2c_sam_twi_driver_api);
#endif