summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6838b03)
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>
27 files changed:
-#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
/* n (debug level) is ignored */
/* additional debug output may be enabled by re-compiling with
-#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
/* n (debug level) is ignored */
/* additional debug output may be enabled by re-compiling with
p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK;
rc = pcmcia_request_io(p_dev, &p_dev->io);
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;
}
"pcmcia_request_io returned 0x%x\n", rc);
return rc;
}
fail_rc = pcmcia_request_configuration(link, &link->conf);
if (fail_rc != 0) {
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;
"pcmcia_request_configuration failed 0x%x\n",
fail_rc);
goto cs_release;
}
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) {
printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n");
if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n");
printk(KERN_ERR "3c589_cs: invalid if_port requested\n");
link->dev_node = &lp->node;
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");
if (register_netdev(dev) != 0) {
printk(KERN_ERR "3c589_cs: register_netdev() failed\n");
info->phy_id = (i < 32) ? i : -1;
link->dev_node = &info->node;
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");
if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n");
lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */
link->dev_node = &info->node;
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 */
i = com20020_found(dev, 0); /* calls register_netdev */
lp->cardtype = cardtype;
link->dev_node = &lp->node;
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");
if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n");
ibmtr_hw_setup(dev, mmiobase);
link->dev_node = &info->node;
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) {
i = ibmtr_probe_card(dev);
if (i != 0) {
printk(KERN_NOTICE "nmclan_cs: invalid if_port requested\n");
link->dev_node = &lp->node;
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) {
i = register_netdev(dev);
if (i != 0) {
mii_phy_probe(dev);
link->dev_node = &info->node;
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");
if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n");
}
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) {
printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n");
if (register_netdev(dev) != 0) {
printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n");
do_reset(dev, 1); /* a kludge to make the cem56 work */
link->dev_node = &local->node;
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");
if ((err=register_netdev(dev))) {
printk(KNOT_XIRC "register_netdev() failed\n");
goto failed;
((local_info_t *)link->priv)->eth_dev =
init_airo_card(link->irq.AssignedIRQ,
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;
if (!((local_info_t *)link->priv)->eth_dev)
goto failed;
struct pcmcia_device_id *did;
dev = link->priv;
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");
dev_dbg(&link->dev, "atmel_config\n");
init_atmel_card(link->irq.AssignedIRQ,
link->io.BasePort1,
did ? did->driver_info : ATMEL_FW_TYPE_NONE,
init_atmel_card(link->irq.AssignedIRQ,
link->io.BasePort1,
did ? did->driver_info : ATMEL_FW_TYPE_NONE,
card_present,
link);
if (!((local_info_t*)link->priv)->eth_dev)
card_present,
link);
if (!((local_info_t*)link->priv)->eth_dev)
/* Need to allocate net_device before requesting IRQ handler */
dev = prism2_init_local_data(&prism2_pccard_funcs, 0,
/* Need to allocate net_device before requesting IRQ handler */
dev = prism2_init_local_data(&prism2_pccard_funcs, 0,
if (dev == NULL)
goto failed;
link->priv = dev;
if (dev == NULL)
goto failed;
link->priv = dev;
/* TODO: make firmware file configurable */
ret = request_firmware(&fw, "libertas_cs_helper.fw",
/* TODO: make firmware file configurable */
ret = request_firmware(&fw, "libertas_cs_helper.fw",
- &handle_to_dev(card->p_dev));
if (ret) {
lbs_pr_err("can't load helper firmware\n");
ret = -ENODEV;
if (ret) {
lbs_pr_err("can't load helper firmware\n");
ret = -ENODEV;
/* TODO: make firmware file configurable */
ret = request_firmware(&fw, "libertas_cs.fw",
/* TODO: make firmware file configurable */
ret = request_firmware(&fw, "libertas_cs.fw",
- &handle_to_dev(card->p_dev));
if (ret) {
lbs_pr_err("can't load firmware\n");
ret = -ENODEV;
if (ret) {
lbs_pr_err("can't load firmware\n");
ret = -ENODEV;
dev->irq = link->irq.AssignedIRQ;
dev->base_addr = link->io.BasePort1;
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");
if (register_netdev(dev) != 0) {
printk(KERN_DEBUG "netwave_cs: register_netdev() failed\n");
struct orinoco_private *priv;
struct orinoco_pccard *card;
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;
orinoco_cs_hard_reset, NULL);
if (!priv)
return -ENOMEM;
struct orinoco_private *priv;
struct orinoco_pccard *card;
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)
spectrum_cs_hard_reset,
spectrum_cs_stop_firmware);
if (!priv)
- 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");
i = register_netdev(dev);
if (i != 0) {
printk("ray_config register_netdev() failed\n");
lp->mem, dev->irq, (u_int) dev->base_addr);
#endif
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)
{
i = register_netdev(dev);
if(i != 0)
{
dev->irq = link->irq.AssignedIRQ;
dev->base_addr = link->io.BasePort1;
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;
if (register_netdev(dev)) {
printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n");
goto failed;
port.irq = irq;
port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ;
port.uartclk = 1843200;
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;
if (buggy_uart)
port.flags |= UPF_BUGGY_UART;
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;
int ret;
local_info_t *dev = link->priv;
int ret;
#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_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)
-
- snd_card_set_dev(card, &handle_to_dev(link));
+ snd_card_set_dev(card, &link->dev);
pdacf->index = i;
card_list[i] = card;
pdacf->index = i;
card_list[i] = card;
- 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)
snd_card_set_dev(chip->card, chip->dev);
if (snd_vxpocket_assign_resources(chip, link->io.BasePort1, link->irq.AssignedIRQ) < 0)