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
|
@ -31,7 +31,7 @@ LOG_MODULE_REGISTER(DHT, CONFIG_SENSOR_LOG_LEVEL);
|
|||
static int8_t dht_measure_signal_duration(struct device *dev,
|
||||
bool active)
|
||||
{
|
||||
struct dht_data *drv_data = dev->driver_data;
|
||||
struct dht_data *drv_data = dev->data;
|
||||
const struct dht_config *cfg = dev->config;
|
||||
uint32_t elapsed_cycles;
|
||||
uint32_t max_wait_cycles = (uint32_t)(
|
||||
|
@ -59,7 +59,7 @@ static int8_t dht_measure_signal_duration(struct device *dev,
|
|||
|
||||
static int dht_sample_fetch(struct device *dev, enum sensor_channel chan)
|
||||
{
|
||||
struct dht_data *drv_data = dev->driver_data;
|
||||
struct dht_data *drv_data = dev->data;
|
||||
const struct dht_config *cfg = dev->config;
|
||||
int ret = 0;
|
||||
int8_t signal_duration[DHT_DATA_BITS_NUM];
|
||||
|
@ -168,7 +168,7 @@ static int dht_channel_get(struct device *dev,
|
|||
enum sensor_channel chan,
|
||||
struct sensor_value *val)
|
||||
{
|
||||
struct dht_data *drv_data = dev->driver_data;
|
||||
struct dht_data *drv_data = dev->data;
|
||||
|
||||
__ASSERT_NO_MSG(chan == SENSOR_CHAN_AMBIENT_TEMP
|
||||
|| chan == SENSOR_CHAN_HUMIDITY);
|
||||
|
@ -224,7 +224,7 @@ static const struct sensor_driver_api dht_api = {
|
|||
static int dht_init(struct device *dev)
|
||||
{
|
||||
int rc = 0;
|
||||
struct dht_data *drv_data = dev->driver_data;
|
||||
struct dht_data *drv_data = dev->data;
|
||||
const struct dht_config *cfg = dev->config;
|
||||
|
||||
drv_data->gpio = device_get_binding(cfg->ctrl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue