aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/sl811_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/sl811_cs.c')
-rw-r--r--drivers/usb/host/sl811_cs.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c
index 39d253e841f6..a712788f9b10 100644
--- a/drivers/usb/host/sl811_cs.c
+++ b/drivers/usb/host/sl811_cs.c
@@ -163,8 +163,7 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev,
163 dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; 163 dflt->vpp1.param[CISTPL_POWER_VNOM]/10000;
164 164
165 /* we need an interrupt */ 165 /* we need an interrupt */
166 if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) 166 p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
167 p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
168 167
169 /* IO window settings */ 168 /* IO window settings */
170 p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; 169 p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0;
@@ -197,11 +196,8 @@ static int sl811_cs_config(struct pcmcia_device *link)
197 /* require an IRQ and two registers */ 196 /* require an IRQ and two registers */
198 if (!link->io.NumPorts1 || link->io.NumPorts1 < 2) 197 if (!link->io.NumPorts1 || link->io.NumPorts1 < 2)
199 goto failed; 198 goto failed;
200 if (link->conf.Attributes & CONF_ENABLE_IRQ) { 199
201 ret = pcmcia_request_irq(link, &link->irq); 200 if (!link->irq)
202 if (ret)
203 goto failed;
204 } else
205 goto failed; 201 goto failed;
206 202
207 ret = pcmcia_request_configuration(link, &link->conf); 203 ret = pcmcia_request_configuration(link, &link->conf);
@@ -216,12 +212,12 @@ static int sl811_cs_config(struct pcmcia_device *link)
216 dev->node.dev_name, link->conf.ConfigIndex); 212 dev->node.dev_name, link->conf.ConfigIndex);
217 if (link->conf.Vpp) 213 if (link->conf.Vpp)
218 printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); 214 printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10);
219 printk(", irq %d", link->irq.AssignedIRQ); 215 printk(", irq %d", link->irq);
220 printk(", io 0x%04x-0x%04x", link->io.BasePort1, 216 printk(", io 0x%04x-0x%04x", link->io.BasePort1,
221 link->io.BasePort1+link->io.NumPorts1-1); 217 link->io.BasePort1+link->io.NumPorts1-1);
222 printk("\n"); 218 printk("\n");
223 219
224 if (sl811_hc_init(parent, link->io.BasePort1, link->irq.AssignedIRQ) 220 if (sl811_hc_init(parent, link->io.BasePort1, link->irq)
225 < 0) { 221 < 0) {
226failed: 222failed:
227 printk(KERN_WARNING "sl811_cs_config failed\n"); 223 printk(KERN_WARNING "sl811_cs_config failed\n");
@@ -241,10 +237,6 @@ static int sl811_cs_probe(struct pcmcia_device *link)
241 local->p_dev = link; 237 local->p_dev = link;
242 link->priv = local; 238 link->priv = local;
243 239
244 /* Initialize */
245 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
246 link->irq.Handler = NULL;
247
248 link->conf.Attributes = 0; 240 link->conf.Attributes = 0;
249 link->conf.IntType = INT_MEMORY_AND_IO; 241 link->conf.IntType = INT_MEMORY_AND_IO;
250 242