diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-03-20 14:35:12 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-05-10 04:23:15 -0400 |
commit | ded6a1a341cb38c4cfeb09d3d01ffe16b5c804b3 (patch) | |
tree | c430b9dc1ee04ecbe39da798524684b2db779b0f /drivers/isdn/hisax/sedlbauer_cs.c | |
parent | 317b6d63000b3cc48c43d582d76063500e531a6c (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/isdn/hisax/sedlbauer_cs.c')
-rw-r--r-- | drivers/isdn/hisax/sedlbauer_cs.c | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c index 7778385b05b2..1f4feaab21af 100644 --- a/drivers/isdn/hisax/sedlbauer_cs.c +++ b/drivers/isdn/hisax/sedlbauer_cs.c | |||
@@ -87,32 +87,8 @@ static void sedlbauer_release(struct pcmcia_device *link); | |||
87 | 87 | ||
88 | static void sedlbauer_detach(struct pcmcia_device *p_dev) __devexit; | 88 | static void sedlbauer_detach(struct pcmcia_device *p_dev) __devexit; |
89 | 89 | ||
90 | /* | ||
91 | You'll also need to prototype all the functions that will actually | ||
92 | be used to talk to your device. See 'memory_cs' for a good example | ||
93 | of a fully self-sufficient driver; the other drivers rely more or | ||
94 | less on other parts of the kernel. | ||
95 | */ | ||
96 | |||
97 | /* | ||
98 | A driver needs to provide a dev_node_t structure for each device | ||
99 | on a card. In some cases, there is only one device per card (for | ||
100 | example, ethernet cards, modems). In other cases, there may be | ||
101 | many actual or logical devices (SCSI adapters, memory cards with | ||
102 | multiple partitions). The dev_node_t structures need to be kept | ||
103 | in a linked list starting at the 'dev' field of a struct pcmcia_device | ||
104 | structure. We allocate them in the card's private data structure, | ||
105 | because they generally shouldn't be allocated dynamically. | ||
106 | |||
107 | In this case, we also provide a flag to indicate if a device is | ||
108 | "stopped" due to a power management event, or card ejection. The | ||
109 | device IO routines can use a flag like this to throttle IO to a | ||
110 | card that is not ready to accept it. | ||
111 | */ | ||
112 | |||
113 | typedef struct local_info_t { | 90 | typedef struct local_info_t { |
114 | struct pcmcia_device *p_dev; | 91 | struct pcmcia_device *p_dev; |
115 | dev_node_t node; | ||
116 | int stop; | 92 | int stop; |
117 | int cardnr; | 93 | int cardnr; |
118 | } local_info_t; | 94 | } local_info_t; |
@@ -279,7 +255,6 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev, | |||
279 | 255 | ||
280 | static int __devinit sedlbauer_config(struct pcmcia_device *link) | 256 | static int __devinit sedlbauer_config(struct pcmcia_device *link) |
281 | { | 257 | { |
282 | local_info_t *dev = link->priv; | ||
283 | win_req_t *req; | 258 | win_req_t *req; |
284 | int ret; | 259 | int ret; |
285 | IsdnCard_t icard; | 260 | IsdnCard_t icard; |
@@ -315,17 +290,9 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link) | |||
315 | if (ret) | 290 | if (ret) |
316 | goto failed; | 291 | goto failed; |
317 | 292 | ||
318 | /* | ||
319 | At this point, the dev_node_t structure(s) need to be | ||
320 | initialized and arranged in a linked list at link->dev. | ||
321 | */ | ||
322 | sprintf(dev->node.dev_name, "sedlbauer"); | ||
323 | dev->node.major = dev->node.minor = 0; | ||
324 | link->dev_node = &dev->node; | ||
325 | |||
326 | /* Finally, report what we've done */ | 293 | /* Finally, report what we've done */ |
327 | printk(KERN_INFO "%s: index 0x%02x:", | 294 | dev_info(&link->dev, "index 0x%02x:", |
328 | dev->node.dev_name, link->conf.ConfigIndex); | 295 | link->conf.ConfigIndex); |
329 | if (link->conf.Vpp) | 296 | if (link->conf.Vpp) |
330 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); | 297 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); |
331 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 298 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |