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
|
@ -251,7 +251,7 @@ static void set_ppp_carrier_on(struct gsm_modem *gsm)
|
|||
return;
|
||||
}
|
||||
|
||||
api = (const struct ppp_api *)ppp_dev->driver_api;
|
||||
api = (const struct ppp_api *)ppp_dev->api;
|
||||
api->start(ppp_dev);
|
||||
}
|
||||
|
||||
|
@ -561,7 +561,7 @@ static void gsm_configure(struct k_work *work)
|
|||
|
||||
static int gsm_init(struct device *device)
|
||||
{
|
||||
struct gsm_modem *gsm = device->driver_data;
|
||||
struct gsm_modem *gsm = device->data;
|
||||
int r;
|
||||
|
||||
LOG_DBG("Generic GSM modem (%p)", gsm);
|
||||
|
|
|
@ -1667,7 +1667,7 @@ static uint32_t hash32(char *str, int len)
|
|||
|
||||
static inline uint8_t *modem_get_mac(struct device *dev)
|
||||
{
|
||||
struct modem_data *data = dev->driver_data;
|
||||
struct modem_data *data = dev->data;
|
||||
uint32_t hash_value;
|
||||
|
||||
data->mac_addr[0] = 0x00;
|
||||
|
@ -1684,7 +1684,7 @@ static inline uint8_t *modem_get_mac(struct device *dev)
|
|||
static void modem_net_iface_init(struct net_if *iface)
|
||||
{
|
||||
struct device *dev = net_if_get_device(iface);
|
||||
struct modem_data *data = dev->driver_data;
|
||||
struct modem_data *data = dev->data;
|
||||
|
||||
/* Direct socket offload used instead of net offload: */
|
||||
iface->if_dev->offload = &modem_net_offload;
|
||||
|
|
|
@ -1820,7 +1820,7 @@ static struct net_offload offload_funcs = {
|
|||
|
||||
static inline uint8_t *wncm14a2a_get_mac(struct device *dev)
|
||||
{
|
||||
struct wncm14a2a_iface_ctx *ctx = dev->driver_data;
|
||||
struct wncm14a2a_iface_ctx *ctx = dev->data;
|
||||
|
||||
ctx->mac_addr[0] = 0x00;
|
||||
ctx->mac_addr[1] = 0x10;
|
||||
|
@ -1834,7 +1834,7 @@ static inline uint8_t *wncm14a2a_get_mac(struct device *dev)
|
|||
static void offload_iface_init(struct net_if *iface)
|
||||
{
|
||||
struct device *dev = net_if_get_device(iface);
|
||||
struct wncm14a2a_iface_ctx *ctx = dev->driver_data;
|
||||
struct wncm14a2a_iface_ctx *ctx = dev->data;
|
||||
|
||||
iface->if_dev->offload = &offload_funcs;
|
||||
net_if_set_link_addr(iface, wncm14a2a_get_mac(dev),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue