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
|
@ -2382,7 +2382,7 @@ static struct ptp_context ptp_gmac_0_context;
|
|||
static int ptp_clock_sam_gmac_set(struct device *dev,
|
||||
struct net_ptp_time *tm)
|
||||
{
|
||||
struct ptp_context *ptp_context = dev->driver_data;
|
||||
struct ptp_context *ptp_context = dev->data;
|
||||
const struct eth_sam_dev_cfg *const cfg = DEV_CFG(ptp_context->eth_dev);
|
||||
Gmac *gmac = cfg->regs;
|
||||
|
||||
|
@ -2396,7 +2396,7 @@ static int ptp_clock_sam_gmac_set(struct device *dev,
|
|||
static int ptp_clock_sam_gmac_get(struct device *dev,
|
||||
struct net_ptp_time *tm)
|
||||
{
|
||||
struct ptp_context *ptp_context = dev->driver_data;
|
||||
struct ptp_context *ptp_context = dev->data;
|
||||
const struct eth_sam_dev_cfg *const cfg = DEV_CFG(ptp_context->eth_dev);
|
||||
Gmac *gmac = cfg->regs;
|
||||
|
||||
|
@ -2408,7 +2408,7 @@ static int ptp_clock_sam_gmac_get(struct device *dev,
|
|||
|
||||
static int ptp_clock_sam_gmac_adjust(struct device *dev, int increment)
|
||||
{
|
||||
struct ptp_context *ptp_context = dev->driver_data;
|
||||
struct ptp_context *ptp_context = dev->data;
|
||||
const struct eth_sam_dev_cfg *const cfg = DEV_CFG(ptp_context->eth_dev);
|
||||
Gmac *gmac = cfg->regs;
|
||||
|
||||
|
@ -2440,8 +2440,8 @@ static const struct ptp_clock_driver_api ptp_api = {
|
|||
static int ptp_gmac_init(struct device *port)
|
||||
{
|
||||
struct device *eth_dev = DEVICE_GET(eth0_sam_gmac);
|
||||
struct eth_sam_dev_data *dev_data = eth_dev->driver_data;
|
||||
struct ptp_context *ptp_context = port->driver_data;
|
||||
struct eth_sam_dev_data *dev_data = eth_dev->data;
|
||||
struct ptp_context *ptp_context = port->data;
|
||||
|
||||
dev_data->ptp_clock = port;
|
||||
ptp_context->eth_dev = eth_dev;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue