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
|
@ -101,7 +101,7 @@ static int read_port_regs(struct device *dev, uint8_t reg, uint16_t *buf)
|
|||
{
|
||||
const struct gpio_pca95xx_config * const config = dev->config;
|
||||
struct gpio_pca95xx_drv_data * const drv_data =
|
||||
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
|
||||
(struct gpio_pca95xx_drv_data * const)dev->data;
|
||||
struct device * const i2c_master = drv_data->i2c_master;
|
||||
uint16_t i2c_addr = config->i2c_slave_addr;
|
||||
uint16_t port_data;
|
||||
|
@ -140,7 +140,7 @@ static int write_port_regs(struct device *dev, uint8_t reg,
|
|||
{
|
||||
const struct gpio_pca95xx_config * const config = dev->config;
|
||||
struct gpio_pca95xx_drv_data * const drv_data =
|
||||
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
|
||||
(struct gpio_pca95xx_drv_data * const)dev->data;
|
||||
struct device * const i2c_master = drv_data->i2c_master;
|
||||
uint16_t i2c_addr = config->i2c_slave_addr;
|
||||
uint16_t port_data;
|
||||
|
@ -167,7 +167,7 @@ static int write_port_regs(struct device *dev, uint8_t reg,
|
|||
static inline int update_output_regs(struct device *dev, uint16_t value)
|
||||
{
|
||||
struct gpio_pca95xx_drv_data * const drv_data =
|
||||
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
|
||||
(struct gpio_pca95xx_drv_data * const)dev->data;
|
||||
|
||||
return write_port_regs(dev, REG_OUTPUT_PORT0,
|
||||
&drv_data->reg_cache.output, value);
|
||||
|
@ -176,7 +176,7 @@ static inline int update_output_regs(struct device *dev, uint16_t value)
|
|||
static inline int update_direction_regs(struct device *dev, uint16_t value)
|
||||
{
|
||||
struct gpio_pca95xx_drv_data * const drv_data =
|
||||
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
|
||||
(struct gpio_pca95xx_drv_data * const)dev->data;
|
||||
|
||||
return write_port_regs(dev, REG_CONF_PORT0,
|
||||
&drv_data->reg_cache.dir, value);
|
||||
|
@ -185,7 +185,7 @@ static inline int update_direction_regs(struct device *dev, uint16_t value)
|
|||
static inline int update_pul_sel_regs(struct device *dev, uint16_t value)
|
||||
{
|
||||
struct gpio_pca95xx_drv_data * const drv_data =
|
||||
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
|
||||
(struct gpio_pca95xx_drv_data * const)dev->data;
|
||||
|
||||
return write_port_regs(dev, REG_PUD_SEL_PORT0,
|
||||
&drv_data->reg_cache.pud_sel, value);
|
||||
|
@ -194,7 +194,7 @@ static inline int update_pul_sel_regs(struct device *dev, uint16_t value)
|
|||
static inline int update_pul_en_regs(struct device *dev, uint16_t value)
|
||||
{
|
||||
struct gpio_pca95xx_drv_data * const drv_data =
|
||||
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
|
||||
(struct gpio_pca95xx_drv_data * const)dev->data;
|
||||
|
||||
return write_port_regs(dev, REG_PUD_EN_PORT0,
|
||||
&drv_data->reg_cache.pud_en, value);
|
||||
|
@ -212,7 +212,7 @@ static inline int update_pul_en_regs(struct device *dev, uint16_t value)
|
|||
static int setup_pin_dir(struct device *dev, uint32_t pin, int flags)
|
||||
{
|
||||
struct gpio_pca95xx_drv_data * const drv_data =
|
||||
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
|
||||
(struct gpio_pca95xx_drv_data * const)dev->data;
|
||||
uint16_t reg_dir = drv_data->reg_cache.dir;
|
||||
uint16_t reg_out = drv_data->reg_cache.output;
|
||||
int ret;
|
||||
|
@ -252,7 +252,7 @@ static int setup_pin_pullupdown(struct device *dev, uint32_t pin, int flags)
|
|||
{
|
||||
const struct gpio_pca95xx_config * const config = dev->config;
|
||||
struct gpio_pca95xx_drv_data * const drv_data =
|
||||
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
|
||||
(struct gpio_pca95xx_drv_data * const)dev->data;
|
||||
uint16_t reg_pud;
|
||||
int ret;
|
||||
|
||||
|
@ -310,7 +310,7 @@ static int gpio_pca95xx_config(struct device *dev,
|
|||
{
|
||||
int ret;
|
||||
struct gpio_pca95xx_drv_data * const drv_data =
|
||||
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
|
||||
(struct gpio_pca95xx_drv_data * const)dev->data;
|
||||
|
||||
#if (CONFIG_GPIO_LOG_LEVEL >= LOG_LEVEL_DEBUG)
|
||||
const struct gpio_pca95xx_config * const config = dev->config;
|
||||
|
@ -358,7 +358,7 @@ done:
|
|||
static int gpio_pca95xx_port_get_raw(struct device *dev, uint32_t *value)
|
||||
{
|
||||
struct gpio_pca95xx_drv_data * const drv_data =
|
||||
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
|
||||
(struct gpio_pca95xx_drv_data * const)dev->data;
|
||||
uint16_t buf;
|
||||
int ret;
|
||||
|
||||
|
@ -385,7 +385,7 @@ static int gpio_pca95xx_port_set_masked_raw(struct device *dev,
|
|||
uint32_t mask, uint32_t value)
|
||||
{
|
||||
struct gpio_pca95xx_drv_data * const drv_data =
|
||||
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
|
||||
(struct gpio_pca95xx_drv_data * const)dev->data;
|
||||
uint16_t reg_out;
|
||||
int ret;
|
||||
|
||||
|
@ -419,7 +419,7 @@ static int gpio_pca95xx_port_clear_bits_raw(struct device *dev, uint32_t mask)
|
|||
static int gpio_pca95xx_port_toggle_bits(struct device *dev, uint32_t mask)
|
||||
{
|
||||
struct gpio_pca95xx_drv_data * const drv_data =
|
||||
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
|
||||
(struct gpio_pca95xx_drv_data * const)dev->data;
|
||||
uint16_t reg_out;
|
||||
int ret;
|
||||
|
||||
|
@ -468,7 +468,7 @@ static int gpio_pca95xx_init(struct device *dev)
|
|||
{
|
||||
const struct gpio_pca95xx_config * const config = dev->config;
|
||||
struct gpio_pca95xx_drv_data * const drv_data =
|
||||
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
|
||||
(struct gpio_pca95xx_drv_data * const)dev->data;
|
||||
struct device *i2c_master;
|
||||
|
||||
/* Find out the device struct of the I2C master */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue