Commit dd2e5a15 authored by Dominik Brodowski's avatar Dominik Brodowski

pcmcia: remove deprecated handle_to_dev() macro

Update remaining users and remove deprecated handle_to_dev() macro

CC: Harald Welte <laforge@gnumonks.org>
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-serial@vger.kernel.org
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 6838b03f
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
/* #define ATR_CSUM */ /* #define ATR_CSUM */
#define reader_to_dev(x) (&handle_to_dev(x->p_dev)) #define reader_to_dev(x) (&x->p_dev->dev)
/* n (debug level) is ignored */ /* n (debug level) is ignored */
/* additional debug output may be enabled by re-compiling with /* additional debug output may be enabled by re-compiling with
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include "cm4040_cs.h" #include "cm4040_cs.h"
#define reader_to_dev(x) (&handle_to_dev(x->p_dev)) #define reader_to_dev(x) (&x->p_dev->dev)
/* n (debug level) is ignored */ /* n (debug level) is ignored */
/* additional debug output may be enabled by re-compiling with /* additional debug output may be enabled by re-compiling with
...@@ -539,7 +539,7 @@ static int cm4040_config_check(struct pcmcia_device *p_dev, ...@@ -539,7 +539,7 @@ static int cm4040_config_check(struct pcmcia_device *p_dev,
p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK; p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK;
rc = pcmcia_request_io(p_dev, &p_dev->io); rc = pcmcia_request_io(p_dev, &p_dev->io);
dev_printk(KERN_INFO, &handle_to_dev(p_dev), dev_printk(KERN_INFO, &p_dev->dev,
"pcmcia_request_io returned 0x%x\n", rc); "pcmcia_request_io returned 0x%x\n", rc);
return rc; return rc;
} }
...@@ -561,7 +561,7 @@ static int reader_config(struct pcmcia_device *link, int devno) ...@@ -561,7 +561,7 @@ static int reader_config(struct pcmcia_device *link, int devno)
fail_rc = pcmcia_request_configuration(link, &link->conf); fail_rc = pcmcia_request_configuration(link, &link->conf);
if (fail_rc != 0) { if (fail_rc != 0) {
dev_printk(KERN_INFO, &handle_to_dev(link), dev_printk(KERN_INFO, &link->dev,
"pcmcia_request_configuration failed 0x%x\n", "pcmcia_request_configuration failed 0x%x\n",
fail_rc); fail_rc);
goto cs_release; goto cs_release;
......
...@@ -449,7 +449,7 @@ static int tc574_config(struct pcmcia_device *link) ...@@ -449,7 +449,7 @@ static int tc574_config(struct pcmcia_device *link)
} }
link->dev_node = &lp->node; link->dev_node = &lp->node;
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) { if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n"); printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n");
......
...@@ -316,7 +316,7 @@ static int tc589_config(struct pcmcia_device *link) ...@@ -316,7 +316,7 @@ static int tc589_config(struct pcmcia_device *link)
printk(KERN_ERR "3c589_cs: invalid if_port requested\n"); printk(KERN_ERR "3c589_cs: invalid if_port requested\n");
link->dev_node = &lp->node; link->dev_node = &lp->node;
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) { if (register_netdev(dev) != 0) {
printk(KERN_ERR "3c589_cs: register_netdev() failed\n"); printk(KERN_ERR "3c589_cs: register_netdev() failed\n");
......
...@@ -400,7 +400,7 @@ static int axnet_config(struct pcmcia_device *link) ...@@ -400,7 +400,7 @@ static int axnet_config(struct pcmcia_device *link)
info->phy_id = (i < 32) ? i : -1; info->phy_id = (i < 32) ? i : -1;
link->dev_node = &info->node; link->dev_node = &info->node;
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) { if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n"); printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n");
......
...@@ -302,7 +302,7 @@ static int com20020_config(struct pcmcia_device *link) ...@@ -302,7 +302,7 @@ static int com20020_config(struct pcmcia_device *link)
lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */ lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */
link->dev_node = &info->node; link->dev_node = &info->node;
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
i = com20020_found(dev, 0); /* calls register_netdev */ i = com20020_found(dev, 0); /* calls register_netdev */
......
...@@ -532,7 +532,7 @@ static int fmvj18x_config(struct pcmcia_device *link) ...@@ -532,7 +532,7 @@ static int fmvj18x_config(struct pcmcia_device *link)
lp->cardtype = cardtype; lp->cardtype = cardtype;
link->dev_node = &lp->node; link->dev_node = &lp->node;
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) { if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n"); printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n");
......
...@@ -287,7 +287,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link) ...@@ -287,7 +287,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
ibmtr_hw_setup(dev, mmiobase); ibmtr_hw_setup(dev, mmiobase);
link->dev_node = &info->node; link->dev_node = &info->node;
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
i = ibmtr_probe_card(dev); i = ibmtr_probe_card(dev);
if (i != 0) { if (i != 0) {
......
...@@ -701,7 +701,7 @@ static int nmclan_config(struct pcmcia_device *link) ...@@ -701,7 +701,7 @@ static int nmclan_config(struct pcmcia_device *link)
printk(KERN_NOTICE "nmclan_cs: invalid if_port requested\n"); printk(KERN_NOTICE "nmclan_cs: invalid if_port requested\n");
link->dev_node = &lp->node; link->dev_node = &lp->node;
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
i = register_netdev(dev); i = register_netdev(dev);
if (i != 0) { if (i != 0) {
......
...@@ -646,7 +646,7 @@ static int pcnet_config(struct pcmcia_device *link) ...@@ -646,7 +646,7 @@ static int pcnet_config(struct pcmcia_device *link)
mii_phy_probe(dev); mii_phy_probe(dev);
link->dev_node = &info->node; link->dev_node = &info->node;
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) { if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n"); printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n");
......
...@@ -964,7 +964,7 @@ static int smc91c92_config(struct pcmcia_device *link) ...@@ -964,7 +964,7 @@ static int smc91c92_config(struct pcmcia_device *link)
} }
link->dev_node = &smc->node; link->dev_node = &smc->node;
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) { if (register_netdev(dev) != 0) {
printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n"); printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n");
......
...@@ -992,7 +992,7 @@ xirc2ps_config(struct pcmcia_device * link) ...@@ -992,7 +992,7 @@ xirc2ps_config(struct pcmcia_device * link)
do_reset(dev, 1); /* a kludge to make the cem56 work */ do_reset(dev, 1); /* a kludge to make the cem56 work */
link->dev_node = &local->node; link->dev_node = &local->node;
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
if ((err=register_netdev(dev))) { if ((err=register_netdev(dev))) {
printk(KNOT_XIRC "register_netdev() failed\n"); printk(KNOT_XIRC "register_netdev() failed\n");
......
...@@ -322,7 +322,7 @@ static int airo_config(struct pcmcia_device *link) ...@@ -322,7 +322,7 @@ static int airo_config(struct pcmcia_device *link)
goto failed; goto failed;
((local_info_t *)link->priv)->eth_dev = ((local_info_t *)link->priv)->eth_dev =
init_airo_card(link->irq.AssignedIRQ, init_airo_card(link->irq.AssignedIRQ,
link->io.BasePort1, 1, &handle_to_dev(link)); link->io.BasePort1, 1, &link->dev);
if (!((local_info_t *)link->priv)->eth_dev) if (!((local_info_t *)link->priv)->eth_dev)
goto failed; goto failed;
......
...@@ -260,7 +260,7 @@ static int atmel_config(struct pcmcia_device *link) ...@@ -260,7 +260,7 @@ static int atmel_config(struct pcmcia_device *link)
struct pcmcia_device_id *did; struct pcmcia_device_id *did;
dev = link->priv; dev = link->priv;
did = dev_get_drvdata(&handle_to_dev(link)); did = dev_get_drvdata(&link->dev);
dev_dbg(&link->dev, "atmel_config\n"); dev_dbg(&link->dev, "atmel_config\n");
...@@ -309,7 +309,7 @@ static int atmel_config(struct pcmcia_device *link) ...@@ -309,7 +309,7 @@ static int atmel_config(struct pcmcia_device *link)
init_atmel_card(link->irq.AssignedIRQ, init_atmel_card(link->irq.AssignedIRQ,
link->io.BasePort1, link->io.BasePort1,
did ? did->driver_info : ATMEL_FW_TYPE_NONE, did ? did->driver_info : ATMEL_FW_TYPE_NONE,
&handle_to_dev(link), &link->dev,
card_present, card_present,
link); link);
if (!((local_info_t*)link->priv)->eth_dev) if (!((local_info_t*)link->priv)->eth_dev)
......
...@@ -623,7 +623,7 @@ static int prism2_config(struct pcmcia_device *link) ...@@ -623,7 +623,7 @@ static int prism2_config(struct pcmcia_device *link)
/* Need to allocate net_device before requesting IRQ handler */ /* Need to allocate net_device before requesting IRQ handler */
dev = prism2_init_local_data(&prism2_pccard_funcs, 0, dev = prism2_init_local_data(&prism2_pccard_funcs, 0,
&handle_to_dev(link)); &link->dev);
if (dev == NULL) if (dev == NULL)
goto failed; goto failed;
link->priv = dev; link->priv = dev;
......
...@@ -590,7 +590,7 @@ static int if_cs_prog_helper(struct if_cs_card *card) ...@@ -590,7 +590,7 @@ static int if_cs_prog_helper(struct if_cs_card *card)
/* TODO: make firmware file configurable */ /* TODO: make firmware file configurable */
ret = request_firmware(&fw, "libertas_cs_helper.fw", ret = request_firmware(&fw, "libertas_cs_helper.fw",
&handle_to_dev(card->p_dev)); &card->p_dev->dev);
if (ret) { if (ret) {
lbs_pr_err("can't load helper firmware\n"); lbs_pr_err("can't load helper firmware\n");
ret = -ENODEV; ret = -ENODEV;
...@@ -663,7 +663,7 @@ static int if_cs_prog_real(struct if_cs_card *card) ...@@ -663,7 +663,7 @@ static int if_cs_prog_real(struct if_cs_card *card)
/* TODO: make firmware file configurable */ /* TODO: make firmware file configurable */
ret = request_firmware(&fw, "libertas_cs.fw", ret = request_firmware(&fw, "libertas_cs.fw",
&handle_to_dev(card->p_dev)); &card->p_dev->dev);
if (ret) { if (ret) {
lbs_pr_err("can't load firmware\n"); lbs_pr_err("can't load firmware\n");
ret = -ENODEV; ret = -ENODEV;
......
...@@ -773,7 +773,7 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) { ...@@ -773,7 +773,7 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
dev->irq = link->irq.AssignedIRQ; dev->irq = link->irq.AssignedIRQ;
dev->base_addr = link->io.BasePort1; dev->base_addr = link->io.BasePort1;
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev) != 0) { if (register_netdev(dev) != 0) {
printk(KERN_DEBUG "netwave_cs: register_netdev() failed\n"); printk(KERN_DEBUG "netwave_cs: register_netdev() failed\n");
......
...@@ -109,7 +109,7 @@ orinoco_cs_probe(struct pcmcia_device *link) ...@@ -109,7 +109,7 @@ orinoco_cs_probe(struct pcmcia_device *link)
struct orinoco_private *priv; struct orinoco_private *priv;
struct orinoco_pccard *card; struct orinoco_pccard *card;
priv = alloc_orinocodev(sizeof(*card), &handle_to_dev(link), priv = alloc_orinocodev(sizeof(*card), &link->dev,
orinoco_cs_hard_reset, NULL); orinoco_cs_hard_reset, NULL);
if (!priv) if (!priv)
return -ENOMEM; return -ENOMEM;
......
...@@ -182,7 +182,7 @@ spectrum_cs_probe(struct pcmcia_device *link) ...@@ -182,7 +182,7 @@ spectrum_cs_probe(struct pcmcia_device *link)
struct orinoco_private *priv; struct orinoco_private *priv;
struct orinoco_pccard *card; struct orinoco_pccard *card;
priv = alloc_orinocodev(sizeof(*card), &handle_to_dev(link), priv = alloc_orinocodev(sizeof(*card), &link->dev,
spectrum_cs_hard_reset, spectrum_cs_hard_reset,
spectrum_cs_stop_firmware); spectrum_cs_stop_firmware);
if (!priv) if (!priv)
......
...@@ -488,7 +488,7 @@ static int ray_config(struct pcmcia_device *link) ...@@ -488,7 +488,7 @@ static int ray_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} }
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
i = register_netdev(dev); i = register_netdev(dev);
if (i != 0) { if (i != 0) {
printk("ray_config register_netdev() failed\n"); printk("ray_config register_netdev() failed\n");
......
...@@ -3899,7 +3899,7 @@ wv_pcmcia_config(struct pcmcia_device * link) ...@@ -3899,7 +3899,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
lp->mem, dev->irq, (u_int) dev->base_addr); lp->mem, dev->irq, (u_int) dev->base_addr);
#endif #endif
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
i = register_netdev(dev); i = register_netdev(dev);
if(i != 0) if(i != 0)
{ {
......
...@@ -1975,7 +1975,7 @@ static int wl3501_config(struct pcmcia_device *link) ...@@ -1975,7 +1975,7 @@ static int wl3501_config(struct pcmcia_device *link)
dev->irq = link->irq.AssignedIRQ; dev->irq = link->irq.AssignedIRQ;
dev->base_addr = link->io.BasePort1; dev->base_addr = link->io.BasePort1;
SET_NETDEV_DEV(dev, &handle_to_dev(link)); SET_NETDEV_DEV(dev, &link->dev);
if (register_netdev(dev)) { if (register_netdev(dev)) {
printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n"); printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n");
goto failed; goto failed;
......
...@@ -387,7 +387,7 @@ static int setup_serial(struct pcmcia_device *handle, struct serial_info * info, ...@@ -387,7 +387,7 @@ static int setup_serial(struct pcmcia_device *handle, struct serial_info * info,
port.irq = irq; port.irq = irq;
port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ; port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ;
port.uartclk = 1843200; port.uartclk = 1843200;
port.dev = &handle_to_dev(handle); port.dev = &handle->dev;
if (buggy_uart) if (buggy_uart)
port.flags |= UPF_BUGGY_UART; port.flags |= UPF_BUGGY_UART;
......
...@@ -185,7 +185,7 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev, ...@@ -185,7 +185,7 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev,
static int sl811_cs_config(struct pcmcia_device *link) static int sl811_cs_config(struct pcmcia_device *link)
{ {
struct device *parent = &handle_to_dev(link); struct device *parent = &link->dev;
local_info_t *dev = link->priv; local_info_t *dev = link->priv;
int ret; int ret;
......
...@@ -138,9 +138,6 @@ struct pcmcia_device { ...@@ -138,9 +138,6 @@ struct pcmcia_device {
#define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev) #define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev)
#define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv) #define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv)
/* deprecated -- don't use! */
#define handle_to_dev(handle) (handle->dev)
/* /*
* CIS access. * CIS access.
......
...@@ -131,7 +131,7 @@ static int snd_pdacf_probe(struct pcmcia_device *link) ...@@ -131,7 +131,7 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
return err; return err;
} }
snd_card_set_dev(card, &handle_to_dev(link)); snd_card_set_dev(card, &link->dev);
pdacf->index = i; pdacf->index = i;
card_list[i] = card; card_list[i] = card;
......
...@@ -244,7 +244,7 @@ static int vxpocket_config(struct pcmcia_device *link) ...@@ -244,7 +244,7 @@ static int vxpocket_config(struct pcmcia_device *link)
if (ret) if (ret)
goto failed; goto failed;
chip->dev = &handle_to_dev(link); chip->dev = &link->dev;
snd_card_set_dev(chip->card, chip->dev); snd_card_set_dev(chip->card, chip->dev);
if (snd_vxpocket_assign_resources(chip, link->io.BasePort1, link->irq.AssignedIRQ) < 0) if (snd_vxpocket_assign_resources(chip, link->io.BasePort1, link->irq.AssignedIRQ) < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment