aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/sl811_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-03-07 06:21:16 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2010-05-10 04:23:13 -0400
commiteb14120f743d29744d9475bffec56ff4ad43a749 (patch)
tree56857094d2b0cfc0ecbd1685f18d6edbe78e140f /drivers/usb/host/sl811_cs.c
parenta7debe789dfcaee9c4d81e5738b0be8c5d93930b (diff)
pcmcia: re-work pcmcia_request_irq()
Instead of the old pcmcia_request_irq() interface, drivers may now choose between: - calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq. - use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will clean up automatically on calls to pcmcia_disable_device() or device ejection. - drivers still not capable of IRQF_SHARED (or not telling us so) may use the deprecated pcmcia_request_exclusive_irq() for the time being; they might receive a shared IRQ nonetheless. CC: linux-bluetooth@vger.kernel.org CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-serial@vger.kernel.org CC: alsa-devel@alsa-project.org CC: linux-usb@vger.kernel.org CC: linux-ide@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
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