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.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c
index 39d253e841f..58cb73c8420 100644
--- a/drivers/usb/host/sl811_cs.c
+++ b/drivers/usb/host/sl811_cs.c
@@ -47,7 +47,6 @@ static const char driver_name[DEV_NAME_LEN] = "sl811_cs";
47 47
48typedef struct local_info_t { 48typedef struct local_info_t {
49 struct pcmcia_device *p_dev; 49 struct pcmcia_device *p_dev;
50 dev_node_t node;
51} local_info_t; 50} local_info_t;
52 51
53static void sl811_cs_release(struct pcmcia_device * link); 52static void sl811_cs_release(struct pcmcia_device * link);
@@ -163,8 +162,7 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev,
163 dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; 162 dflt->vpp1.param[CISTPL_POWER_VNOM]/10000;
164 163
165 /* we need an interrupt */ 164 /* we need an interrupt */
166 if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1) 165 p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
167 p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
168 166
169 /* IO window settings */ 167 /* IO window settings */
170 p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; 168 p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0;
@@ -186,7 +184,6 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev,
186static int sl811_cs_config(struct pcmcia_device *link) 184static int sl811_cs_config(struct pcmcia_device *link)
187{ 185{
188 struct device *parent = &link->dev; 186 struct device *parent = &link->dev;
189 local_info_t *dev = link->priv;
190 int ret; 187 int ret;
191 188
192 dev_dbg(&link->dev, "sl811_cs_config\n"); 189 dev_dbg(&link->dev, "sl811_cs_config\n");
@@ -197,31 +194,24 @@ static int sl811_cs_config(struct pcmcia_device *link)
197 /* require an IRQ and two registers */ 194 /* require an IRQ and two registers */
198 if (!link->io.NumPorts1 || link->io.NumPorts1 < 2) 195 if (!link->io.NumPorts1 || link->io.NumPorts1 < 2)
199 goto failed; 196 goto failed;
200 if (link->conf.Attributes & CONF_ENABLE_IRQ) { 197
201 ret = pcmcia_request_irq(link, &link->irq); 198 if (!link->irq)
202 if (ret)
203 goto failed;
204 } else
205 goto failed; 199 goto failed;
206 200
207 ret = pcmcia_request_configuration(link, &link->conf); 201 ret = pcmcia_request_configuration(link, &link->conf);
208 if (ret) 202 if (ret)
209 goto failed; 203 goto failed;
210 204
211 sprintf(dev->node.dev_name, driver_name); 205 dev_info(&link->dev, "index 0x%02x: ",
212 dev->node.major = dev->node.minor = 0; 206 link->conf.ConfigIndex);
213 link->dev_node = &dev->node;
214
215 printk(KERN_INFO "%s: index 0x%02x: ",
216 dev->node.dev_name, link->conf.ConfigIndex);
217 if (link->conf.Vpp) 207 if (link->conf.Vpp)
218 printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); 208 printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10);
219 printk(", irq %d", link->irq.AssignedIRQ); 209 printk(", irq %d", link->irq);
220 printk(", io 0x%04x-0x%04x", link->io.BasePort1, 210 printk(", io 0x%04x-0x%04x", link->io.BasePort1,
221 link->io.BasePort1+link->io.NumPorts1-1); 211 link->io.BasePort1+link->io.NumPorts1-1);
222 printk("\n"); 212 printk("\n");
223 213
224 if (sl811_hc_init(parent, link->io.BasePort1, link->irq.AssignedIRQ) 214 if (sl811_hc_init(parent, link->io.BasePort1, link->irq)
225 < 0) { 215 < 0) {
226failed: 216failed:
227 printk(KERN_WARNING "sl811_cs_config failed\n"); 217 printk(KERN_WARNING "sl811_cs_config failed\n");
@@ -241,10 +231,6 @@ static int sl811_cs_probe(struct pcmcia_device *link)
241 local->p_dev = link; 231 local->p_dev = link;
242 link->priv = local; 232 link->priv = local;
243 233
244 /* Initialize */
245 link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
246 link->irq.Handler = NULL;
247
248 link->conf.Attributes = 0; 234 link->conf.Attributes = 0;
249 link->conf.IntType = INT_MEMORY_AND_IO; 235 link->conf.IntType = INT_MEMORY_AND_IO;
250 236