aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/sedlbauer_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-05 04:45:09 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:15:57 -0500
commitfd238232cd0ff4840ae6946bb338502154096d88 (patch)
treed20e8f5871f7cff9d0867a84f6ba088fbffcbe28 /drivers/isdn/hisax/sedlbauer_cs.c
parenta78f4dd331a4f6a396eb5849656a4a72a70a56d7 (diff)
[PATCH] pcmcia: embed dev_link_t into struct pcmcia_device
Embed dev_link_t into struct pcmcia_device(), as they basically address the same entity. The actual contents of dev_link_t will be cleaned up step by step. This patch includes a bugfix from and signed-off-by Andrew Morton. 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.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index a3cd1c556352..6025722001fa 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -130,7 +130,7 @@ static void sedlbauer_detach(struct pcmcia_device *p_dev);
130*/ 130*/
131 131
132typedef struct local_info_t { 132typedef struct local_info_t {
133 dev_link_t link; 133 struct pcmcia_device *p_dev;
134 dev_node_t node; 134 dev_node_t node;
135 int stop; 135 int stop;
136 int cardnr; 136 int cardnr;
@@ -151,7 +151,7 @@ typedef struct local_info_t {
151static int sedlbauer_attach(struct pcmcia_device *p_dev) 151static int sedlbauer_attach(struct pcmcia_device *p_dev)
152{ 152{
153 local_info_t *local; 153 local_info_t *local;
154 dev_link_t *link; 154 dev_link_t *link = dev_to_instance(p_dev);
155 155
156 DEBUG(0, "sedlbauer_attach()\n"); 156 DEBUG(0, "sedlbauer_attach()\n");
157 157
@@ -160,8 +160,10 @@ static int sedlbauer_attach(struct pcmcia_device *p_dev)
160 if (!local) return -ENOMEM; 160 if (!local) return -ENOMEM;
161 memset(local, 0, sizeof(local_info_t)); 161 memset(local, 0, sizeof(local_info_t));
162 local->cardnr = -1; 162 local->cardnr = -1;
163 link = &local->link; link->priv = local; 163
164 164 local->p_dev = p_dev;
165 link->priv = local;
166
165 /* Interrupt setup */ 167 /* Interrupt setup */
166 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; 168 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
167 link->irq.IRQInfo1 = IRQ_LEVEL_ID; 169 link->irq.IRQInfo1 = IRQ_LEVEL_ID;
@@ -182,13 +184,9 @@ static int sedlbauer_attach(struct pcmcia_device *p_dev)
182 link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; 184 link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
183 link->io.IOAddrLines = 3; 185 link->io.IOAddrLines = 3;
184 186
185
186 link->conf.Attributes = 0; 187 link->conf.Attributes = 0;
187 link->conf.IntType = INT_MEMORY_AND_IO; 188 link->conf.IntType = INT_MEMORY_AND_IO;
188 189
189 link->handle = p_dev;
190 p_dev->instance = link;
191
192 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 190 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
193 sedlbauer_config(link); 191 sedlbauer_config(link);
194 192
@@ -397,7 +395,7 @@ static void sedlbauer_config(dev_link_t *link)
397 */ 395 */
398 sprintf(dev->node.dev_name, "sedlbauer"); 396 sprintf(dev->node.dev_name, "sedlbauer");
399 dev->node.major = dev->node.minor = 0; 397 dev->node.major = dev->node.minor = 0;
400 link->dev = &dev->node; 398 link->dev_node = &dev->node;
401 399
402 /* Finally, report what we've done */ 400 /* Finally, report what we've done */
403 printk(KERN_INFO "%s: index 0x%02x:", 401 printk(KERN_INFO "%s: index 0x%02x:",