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:
parent
f928e1b144
commit
0a408785ac
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
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,
|
&i2c0_sam_data, &i2c0_sam_config, POST_KERNEL,
|
||||||
CONFIG_I2C_INIT_PRIORITY, &i2c_sam_twi_driver_api);
|
CONFIG_I2C_INIT_PRIORITY, &i2c_sam_twi_driver_api);
|
||||||
#endif
|
#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;
|
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,
|
&i2c1_sam_data, &i2c1_sam_config, POST_KERNEL,
|
||||||
CONFIG_I2C_INIT_PRIORITY, &i2c_sam_twi_driver_api);
|
CONFIG_I2C_INIT_PRIORITY, &i2c_sam_twi_driver_api);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue