aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-03-20 14:35:12 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-05-10 04:23:15 -0400
commitded6a1a341cb38c4cfeb09d3d01ffe16b5c804b3 (patch)
treec430b9dc1ee04ecbe39da798524684b2db779b0f /drivers/net/wireless/airo_cs.c
parent317b6d63000b3cc48c43d582d76063500e531a6c (diff)
pcmcia: dev_node removal (drivers with updated printk call)
As a second step, remove any usage of dev_node_t from drivers which only wrote to this typedef/struct, except one printk() which can easily be replaced by a dev_info()/dev_warn() call. CC: Harald Welte <laforge@gnumonks.org> CC: linux-ide@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: netdev@vger.kernel.org CC: linux-usb@vger.kernel.org Acked-by: Karsten Keil <isdn@linux-pingi.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/wireless/airo_cs.c')
-rw-r--r--drivers/net/wireless/airo_cs.c47
1 files changed, 2 insertions, 45 deletions
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 7867c51be15f..33bdc6a84e81 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -75,42 +75,7 @@ static void airo_release(struct pcmcia_device *link);
75 75
76static void airo_detach(struct pcmcia_device *p_dev); 76static void airo_detach(struct pcmcia_device *p_dev);
77 77
78/*
79 You'll also need to prototype all the functions that will actually
80 be used to talk to your device. See 'pcmem_cs' for a good example
81 of a fully self-sufficient driver; the other drivers rely more or
82 less on other parts of the kernel.
83*/
84
85/*
86 A linked list of "instances" of the aironet device. Each actual
87 PCMCIA card corresponds to one device instance, and is described
88 by one struct pcmcia_device structure (defined in ds.h).
89
90 You may not want to use a linked list for this -- for example, the
91 memory card driver uses an array of struct pcmcia_device pointers,
92 where minor device numbers are used to derive the corresponding
93 array index.
94*/
95
96/*
97 A driver needs to provide a dev_node_t structure for each device
98 on a card. In some cases, there is only one device per card (for
99 example, ethernet cards, modems). In other cases, there may be
100 many actual or logical devices (SCSI adapters, memory cards with
101 multiple partitions). The dev_node_t structures need to be kept
102 in a linked list starting at the 'dev' field of a struct pcmcia_device
103 structure. We allocate them in the card's private data structure,
104 because they generally shouldn't be allocated dynamically.
105
106 In this case, we also provide a flag to indicate if a device is
107 "stopped" due to a power management event, or card ejection. The
108 device IO routines can use a flag like this to throttle IO to a
109 card that is not ready to accept it.
110*/
111
112typedef struct local_info_t { 78typedef struct local_info_t {
113 dev_node_t node;
114 struct net_device *eth_dev; 79 struct net_device *eth_dev;
115} local_info_t; 80} local_info_t;
116 81
@@ -311,17 +276,9 @@ static int airo_config(struct pcmcia_device *link)
311 if (!((local_info_t *)link->priv)->eth_dev) 276 if (!((local_info_t *)link->priv)->eth_dev)
312 goto failed; 277 goto failed;
313 278
314 /*
315 At this point, the dev_node_t structure(s) need to be
316 initialized and arranged in a linked list at link->dev_node.
317 */
318 strcpy(dev->node.dev_name, ((local_info_t *)link->priv)->eth_dev->name);
319 dev->node.major = dev->node.minor = 0;
320 link->dev_node = &dev->node;
321
322 /* Finally, report what we've done */ 279 /* Finally, report what we've done */
323 printk(KERN_INFO "%s: index 0x%02x: ", 280 dev_info(&link->dev, "index 0x%02x: ",
324 dev->node.dev_name, link->conf.ConfigIndex); 281 link->conf.ConfigIndex);
325 if (link->conf.Vpp) 282 if (link->conf.Vpp)
326 printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); 283 printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10);
327 printk(", irq %d", link->irq); 284 printk(", irq %d", link->irq);