dts: Convert from DT_<COMPAT>_<INSTANCE>_<PROP> to DT_INST...

Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-06-11 14:20:32 -05:00 committed by Kumar Gala
commit a2693975d7
206 changed files with 1480 additions and 1479 deletions

View file

@ -401,14 +401,14 @@ static int bme680_init(struct device *dev)
struct bme680_data *data = dev->driver_data;
data->i2c_master = device_get_binding(
DT_BOSCH_BME680_0_BUS_NAME);
DT_INST_0_BOSCH_BME680_BUS_NAME);
if (!data->i2c_master) {
LOG_ERR("I2C master not found: %s",
DT_BOSCH_BME680_0_BUS_NAME);
DT_INST_0_BOSCH_BME680_BUS_NAME);
return -EINVAL;
}
data->i2c_slave_addr = DT_BOSCH_BME680_0_BASE_ADDRESS;
data->i2c_slave_addr = DT_INST_0_BOSCH_BME680_BASE_ADDRESS;
if (bme680_chip_init(dev) < 0) {
return -EINVAL;
@ -424,6 +424,6 @@ static const struct sensor_driver_api bme680_api_funcs = {
static struct bme680_data bme680_data;
DEVICE_AND_API_INIT(bme680, DT_BOSCH_BME680_0_LABEL, bme680_init, &bme680_data,
DEVICE_AND_API_INIT(bme680, DT_INST_0_BOSCH_BME680_LABEL, bme680_init, &bme680_data,
NULL, POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY,
&bme680_api_funcs);