mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
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: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
parent
6838b03fc6
commit
dd2e5a1565
27 changed files with 30 additions and 33 deletions
|
@ -45,7 +45,7 @@
|
|||
|
||||
/* #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 */
|
||||
/* additional debug output may be enabled by re-compiling with
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#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 */
|
||||
/* additional debug output may be enabled by re-compiling with
|
||||
|
@ -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;
|
||||
|
||||
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);
|
||||
return rc;
|
||||
}
|
||||
|
@ -561,7 +561,7 @@ static int reader_config(struct pcmcia_device *link, int devno)
|
|||
|
||||
fail_rc = pcmcia_request_configuration(link, &link->conf);
|
||||
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",
|
||||
fail_rc);
|
||||
goto cs_release;
|
||||
|
|
|
@ -449,7 +449,7 @@ static int tc574_config(struct pcmcia_device *link)
|
|||
}
|
||||
|
||||
link->dev_node = &lp->node;
|
||||
SET_NETDEV_DEV(dev, &handle_to_dev(link));
|
||||
SET_NETDEV_DEV(dev, &link->dev);
|
||||
|
||||
if (register_netdev(dev) != 0) {
|
||||
printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n");
|
||||
|
|
|
@ -316,7 +316,7 @@ static int tc589_config(struct pcmcia_device *link)
|
|||
printk(KERN_ERR "3c589_cs: invalid if_port requested\n");
|
||||
|
||||
link->dev_node = &lp->node;
|
||||
SET_NETDEV_DEV(dev, &handle_to_dev(link));
|
||||
SET_NETDEV_DEV(dev, &link->dev);
|
||||
|
||||
if (register_netdev(dev) != 0) {
|
||||
printk(KERN_ERR "3c589_cs: register_netdev() failed\n");
|
||||
|
|
|
@ -400,7 +400,7 @@ static int axnet_config(struct pcmcia_device *link)
|
|||
|
||||
info->phy_id = (i < 32) ? i : -1;
|
||||
link->dev_node = &info->node;
|
||||
SET_NETDEV_DEV(dev, &handle_to_dev(link));
|
||||
SET_NETDEV_DEV(dev, &link->dev);
|
||||
|
||||
if (register_netdev(dev) != 0) {
|
||||
printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n");
|
||||
|
|
|
@ -302,7 +302,7 @@ static int com20020_config(struct pcmcia_device *link)
|
|||
lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */
|
||||
|
||||
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 */
|
||||
|
||||
|
|
|
@ -532,7 +532,7 @@ static int fmvj18x_config(struct pcmcia_device *link)
|
|||
|
||||
lp->cardtype = cardtype;
|
||||
link->dev_node = &lp->node;
|
||||
SET_NETDEV_DEV(dev, &handle_to_dev(link));
|
||||
SET_NETDEV_DEV(dev, &link->dev);
|
||||
|
||||
if (register_netdev(dev) != 0) {
|
||||
printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n");
|
||||
|
|
|
@ -287,7 +287,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
|
|||
ibmtr_hw_setup(dev, mmiobase);
|
||||
|
||||
link->dev_node = &info->node;
|
||||
SET_NETDEV_DEV(dev, &handle_to_dev(link));
|
||||
SET_NETDEV_DEV(dev, &link->dev);
|
||||
|
||||
i = ibmtr_probe_card(dev);
|
||||
if (i != 0) {
|
||||
|
|
|
@ -701,7 +701,7 @@ static int nmclan_config(struct pcmcia_device *link)
|
|||
printk(KERN_NOTICE "nmclan_cs: invalid if_port requested\n");
|
||||
|
||||
link->dev_node = &lp->node;
|
||||
SET_NETDEV_DEV(dev, &handle_to_dev(link));
|
||||
SET_NETDEV_DEV(dev, &link->dev);
|
||||
|
||||
i = register_netdev(dev);
|
||||
if (i != 0) {
|
||||
|
|
|
@ -646,7 +646,7 @@ static int pcnet_config(struct pcmcia_device *link)
|
|||
mii_phy_probe(dev);
|
||||
|
||||
link->dev_node = &info->node;
|
||||
SET_NETDEV_DEV(dev, &handle_to_dev(link));
|
||||
SET_NETDEV_DEV(dev, &link->dev);
|
||||
|
||||
if (register_netdev(dev) != 0) {
|
||||
printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n");
|
||||
|
|
|
@ -964,7 +964,7 @@ static int smc91c92_config(struct pcmcia_device *link)
|
|||
}
|
||||
|
||||
link->dev_node = &smc->node;
|
||||
SET_NETDEV_DEV(dev, &handle_to_dev(link));
|
||||
SET_NETDEV_DEV(dev, &link->dev);
|
||||
|
||||
if (register_netdev(dev) != 0) {
|
||||
printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n");
|
||||
|
|
|
@ -992,7 +992,7 @@ xirc2ps_config(struct pcmcia_device * link)
|
|||
do_reset(dev, 1); /* a kludge to make the cem56 work */
|
||||
|
||||
link->dev_node = &local->node;
|
||||
SET_NETDEV_DEV(dev, &handle_to_dev(link));
|
||||
SET_NETDEV_DEV(dev, &link->dev);
|
||||
|
||||
if ((err=register_netdev(dev))) {
|
||||
printk(KNOT_XIRC "register_netdev() failed\n");
|
||||
|
|
|
@ -322,7 +322,7 @@ static int airo_config(struct pcmcia_device *link)
|
|||
goto failed;
|
||||
((local_info_t *)link->priv)->eth_dev =
|
||||
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)
|
||||
goto failed;
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ static int atmel_config(struct pcmcia_device *link)
|
|||
struct pcmcia_device_id *did;
|
||||
|
||||
dev = link->priv;
|
||||
did = dev_get_drvdata(&handle_to_dev(link));
|
||||
did = dev_get_drvdata(&link->dev);
|
||||
|
||||
dev_dbg(&link->dev, "atmel_config\n");
|
||||
|
||||
|
@ -309,7 +309,7 @@ static int atmel_config(struct pcmcia_device *link)
|
|||
init_atmel_card(link->irq.AssignedIRQ,
|
||||
link->io.BasePort1,
|
||||
did ? did->driver_info : ATMEL_FW_TYPE_NONE,
|
||||
&handle_to_dev(link),
|
||||
&link->dev,
|
||||
card_present,
|
||||
link);
|
||||
if (!((local_info_t*)link->priv)->eth_dev)
|
||||
|
|
|
@ -623,7 +623,7 @@ static int prism2_config(struct pcmcia_device *link)
|
|||
|
||||
/* Need to allocate net_device before requesting IRQ handler */
|
||||
dev = prism2_init_local_data(&prism2_pccard_funcs, 0,
|
||||
&handle_to_dev(link));
|
||||
&link->dev);
|
||||
if (dev == NULL)
|
||||
goto failed;
|
||||
link->priv = dev;
|
||||
|
|
|
@ -590,7 +590,7 @@ static int if_cs_prog_helper(struct if_cs_card *card)
|
|||
|
||||
/* TODO: make firmware file configurable */
|
||||
ret = request_firmware(&fw, "libertas_cs_helper.fw",
|
||||
&handle_to_dev(card->p_dev));
|
||||
&card->p_dev->dev);
|
||||
if (ret) {
|
||||
lbs_pr_err("can't load helper firmware\n");
|
||||
ret = -ENODEV;
|
||||
|
@ -663,7 +663,7 @@ static int if_cs_prog_real(struct if_cs_card *card)
|
|||
|
||||
/* TODO: make firmware file configurable */
|
||||
ret = request_firmware(&fw, "libertas_cs.fw",
|
||||
&handle_to_dev(card->p_dev));
|
||||
&card->p_dev->dev);
|
||||
if (ret) {
|
||||
lbs_pr_err("can't load firmware\n");
|
||||
ret = -ENODEV;
|
||||
|
|
|
@ -773,7 +773,7 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
|
|||
|
||||
dev->irq = link->irq.AssignedIRQ;
|
||||
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) {
|
||||
printk(KERN_DEBUG "netwave_cs: register_netdev() failed\n");
|
||||
|
|
|
@ -109,7 +109,7 @@ orinoco_cs_probe(struct pcmcia_device *link)
|
|||
struct orinoco_private *priv;
|
||||
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);
|
||||
if (!priv)
|
||||
return -ENOMEM;
|
||||
|
|
|
@ -182,7 +182,7 @@ spectrum_cs_probe(struct pcmcia_device *link)
|
|||
struct orinoco_private *priv;
|
||||
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_stop_firmware);
|
||||
if (!priv)
|
||||
|
|
|
@ -488,7 +488,7 @@ static int ray_config(struct pcmcia_device *link)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
SET_NETDEV_DEV(dev, &handle_to_dev(link));
|
||||
SET_NETDEV_DEV(dev, &link->dev);
|
||||
i = register_netdev(dev);
|
||||
if (i != 0) {
|
||||
printk("ray_config register_netdev() failed\n");
|
||||
|
|
|
@ -3899,7 +3899,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
|
|||
lp->mem, dev->irq, (u_int) dev->base_addr);
|
||||
#endif
|
||||
|
||||
SET_NETDEV_DEV(dev, &handle_to_dev(link));
|
||||
SET_NETDEV_DEV(dev, &link->dev);
|
||||
i = register_netdev(dev);
|
||||
if(i != 0)
|
||||
{
|
||||
|
|
|
@ -1975,7 +1975,7 @@ static int wl3501_config(struct pcmcia_device *link)
|
|||
|
||||
dev->irq = link->irq.AssignedIRQ;
|
||||
dev->base_addr = link->io.BasePort1;
|
||||
SET_NETDEV_DEV(dev, &handle_to_dev(link));
|
||||
SET_NETDEV_DEV(dev, &link->dev);
|
||||
if (register_netdev(dev)) {
|
||||
printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n");
|
||||
goto failed;
|
||||
|
|
|
@ -387,7 +387,7 @@ static int setup_serial(struct pcmcia_device *handle, struct serial_info * info,
|
|||
port.irq = irq;
|
||||
port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ;
|
||||
port.uartclk = 1843200;
|
||||
port.dev = &handle_to_dev(handle);
|
||||
port.dev = &handle->dev;
|
||||
if (buggy_uart)
|
||||
port.flags |= UPF_BUGGY_UART;
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev,
|
|||
|
||||
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;
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -138,9 +138,6 @@ struct pcmcia_device {
|
|||
#define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev)
|
||||
#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.
|
||||
|
|
|
@ -131,7 +131,7 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
|
|||
return err;
|
||||
}
|
||||
|
||||
snd_card_set_dev(card, &handle_to_dev(link));
|
||||
snd_card_set_dev(card, &link->dev);
|
||||
|
||||
pdacf->index = i;
|
||||
card_list[i] = card;
|
||||
|
|
|
@ -244,7 +244,7 @@ static int vxpocket_config(struct pcmcia_device *link)
|
|||
if (ret)
|
||||
goto failed;
|
||||
|
||||
chip->dev = &handle_to_dev(link);
|
||||
chip->dev = &link->dev;
|
||||
snd_card_set_dev(chip->card, chip->dev);
|
||||
|
||||
if (snd_vxpocket_assign_resources(chip, link->io.BasePort1, link->irq.AssignedIRQ) < 0)
|
||||
|
|
Loading…
Reference in a new issue