device: Apply driver_api/data attributes rename everywhere
Via coccinelle: @r_device_driver_api_and_data_1@ struct device *D; @@ ( D-> - driver_api + api | D-> - driver_data + data ) @r_device_driver_api_and_data_2@ expression E; @@ ( net_if_get_device(E)-> - driver_api + api | net_if_get_device(E)-> - driver_data + data ) And grep/sed rules for macros: git grep -rlz 'dev)->driver_data' | xargs -0 sed -i 's/dev)->driver_data/dev)->data/g' git grep -rlz 'dev->driver_data' | xargs -0 sed -i 's/dev->driver_data/dev->data/g' git grep -rlz 'device->driver_data' | xargs -0 sed -i 's/device->driver_data/device->data/g' Fixes #27397 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
d86f79cbd7
commit
98d9b01322
498 changed files with 2085 additions and 2087 deletions
|
@ -190,7 +190,7 @@ static uint8_t bme680_calc_gas_wait(uint16_t dur)
|
|||
|
||||
static int bme680_sample_fetch(struct device *dev, enum sensor_channel chan)
|
||||
{
|
||||
struct bme680_data *data = dev->driver_data;
|
||||
struct bme680_data *data = dev->data;
|
||||
uint8_t buff[BME680_LEN_FIELD] = { 0 };
|
||||
uint8_t gas_range;
|
||||
uint32_t adc_temp, adc_press;
|
||||
|
@ -236,7 +236,7 @@ static int bme680_sample_fetch(struct device *dev, enum sensor_channel chan)
|
|||
static int bme680_channel_get(struct device *dev, enum sensor_channel chan,
|
||||
struct sensor_value *val)
|
||||
{
|
||||
struct bme680_data *data = dev->driver_data;
|
||||
struct bme680_data *data = dev->data;
|
||||
|
||||
switch (chan) {
|
||||
case SENSOR_CHAN_AMBIENT_TEMP:
|
||||
|
@ -341,7 +341,7 @@ static int bme680_read_compensation(struct bme680_data *data)
|
|||
|
||||
static int bme680_chip_init(struct device *dev)
|
||||
{
|
||||
struct bme680_data *data = (struct bme680_data *)dev->driver_data;
|
||||
struct bme680_data *data = (struct bme680_data *)dev->data;
|
||||
int err;
|
||||
|
||||
err = bme680_reg_read(data, BME680_REG_CHIP_ID, &data->chip_id, 1);
|
||||
|
@ -400,7 +400,7 @@ static int bme680_chip_init(struct device *dev)
|
|||
|
||||
static int bme680_init(struct device *dev)
|
||||
{
|
||||
struct bme680_data *data = dev->driver_data;
|
||||
struct bme680_data *data = dev->data;
|
||||
|
||||
data->i2c_master = device_get_binding(
|
||||
DT_INST_BUS_LABEL(0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue