diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 15:25:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 15:25:06 -0400 |
commit | 1685e633b396b0f3dabbc9fa5d65dfefe6435250 (patch) | |
tree | ee83e26e2468ca1518a1b065c690159e12c8def9 /drivers/usb/host | |
parent | 1cfd2bda8c486ae0e7a8005354758ebb68172bca (diff) | |
parent | 127c03cdbad9bd5af5d7f33bd31a1015a90cb77f (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
pcmcia: avoid buffer overflow in pcmcia_setup_isa_irq
pcmcia: do not request windows if you don't need to
pcmcia: insert PCMCIA device resources into resource tree
pcmcia: export resource information to sysfs
pcmcia: use struct resource for PCMCIA devices, part 2
pcmcia: remove memreq_t
pcmcia: move local definitions out of include/pcmcia/cs.h
pcmcia: do not use io_req_t when calling pcmcia_request_io()
pcmcia: do not use io_req_t after call to pcmcia_request_io()
pcmcia: use struct resource for PCMCIA devices
pcmcia: clean up cs.h
pcmcia: use pcmica_{read,write}_config_byte
pcmcia: remove cs_types.h
pcmcia: remove unused flag, simplify headers
pcmcia: remove obsolete CS_EVENT_ definitions
pcmcia: split up central event handler
pcmcia: simplify event callback
pcmcia: remove obsolete ioctl
Conflicts in:
- drivers/staging/comedi/drivers/*
- drivers/staging/wlags49_h2/wl_cs.c
due to dev_info_t and whitespace changes
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/sl811_cs.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c index 58cb73c8420a..0e13a00eb2ed 100644 --- a/drivers/usb/host/sl811_cs.c +++ b/drivers/usb/host/sl811_cs.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | 22 | ||
23 | #include <pcmcia/cs_types.h> | ||
24 | #include <pcmcia/cs.h> | 23 | #include <pcmcia/cs.h> |
25 | #include <pcmcia/cistpl.h> | 24 | #include <pcmcia/cistpl.h> |
26 | #include <pcmcia/cisreg.h> | 25 | #include <pcmcia/cisreg.h> |
@@ -43,8 +42,6 @@ MODULE_LICENSE("GPL"); | |||
43 | /* VARIABLES */ | 42 | /* VARIABLES */ |
44 | /*====================================================================*/ | 43 | /*====================================================================*/ |
45 | 44 | ||
46 | static const char driver_name[DEV_NAME_LEN] = "sl811_cs"; | ||
47 | |||
48 | typedef struct local_info_t { | 45 | typedef struct local_info_t { |
49 | struct pcmcia_device *p_dev; | 46 | struct pcmcia_device *p_dev; |
50 | } local_info_t; | 47 | } local_info_t; |
@@ -165,16 +162,16 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev, | |||
165 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | 162 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
166 | 163 | ||
167 | /* IO window settings */ | 164 | /* IO window settings */ |
168 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 165 | p_dev->resource[0]->end = p_dev->resource[1]->end = 0; |
169 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { | 166 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { |
170 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; | 167 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; |
168 | p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK; | ||
171 | 169 | ||
172 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 170 | p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; |
173 | p_dev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK; | 171 | p_dev->resource[0]->start = io->win[0].base; |
174 | p_dev->io.BasePort1 = io->win[0].base; | 172 | p_dev->resource[0]->end = io->win[0].len; |
175 | p_dev->io.NumPorts1 = io->win[0].len; | ||
176 | 173 | ||
177 | return pcmcia_request_io(p_dev, &p_dev->io); | 174 | return pcmcia_request_io(p_dev); |
178 | } | 175 | } |
179 | pcmcia_disable_device(p_dev); | 176 | pcmcia_disable_device(p_dev); |
180 | return -ENODEV; | 177 | return -ENODEV; |
@@ -192,7 +189,7 @@ static int sl811_cs_config(struct pcmcia_device *link) | |||
192 | goto failed; | 189 | goto failed; |
193 | 190 | ||
194 | /* require an IRQ and two registers */ | 191 | /* require an IRQ and two registers */ |
195 | if (!link->io.NumPorts1 || link->io.NumPorts1 < 2) | 192 | if (resource_size(link->resource[0]) < 2) |
196 | goto failed; | 193 | goto failed; |
197 | 194 | ||
198 | if (!link->irq) | 195 | if (!link->irq) |
@@ -207,11 +204,10 @@ static int sl811_cs_config(struct pcmcia_device *link) | |||
207 | if (link->conf.Vpp) | 204 | if (link->conf.Vpp) |
208 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); | 205 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); |
209 | printk(", irq %d", link->irq); | 206 | printk(", irq %d", link->irq); |
210 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 207 | printk(", io %pR", link->resource[0]); |
211 | link->io.BasePort1+link->io.NumPorts1-1); | ||
212 | printk("\n"); | 208 | printk("\n"); |
213 | 209 | ||
214 | if (sl811_hc_init(parent, link->io.BasePort1, link->irq) | 210 | if (sl811_hc_init(parent, link->resource[0]->start, link->irq) |
215 | < 0) { | 211 | < 0) { |
216 | failed: | 212 | failed: |
217 | printk(KERN_WARNING "sl811_cs_config failed\n"); | 213 | printk(KERN_WARNING "sl811_cs_config failed\n"); |
@@ -246,7 +242,7 @@ MODULE_DEVICE_TABLE(pcmcia, sl811_ids); | |||
246 | static struct pcmcia_driver sl811_cs_driver = { | 242 | static struct pcmcia_driver sl811_cs_driver = { |
247 | .owner = THIS_MODULE, | 243 | .owner = THIS_MODULE, |
248 | .drv = { | 244 | .drv = { |
249 | .name = (char *)driver_name, | 245 | .name = "sl811_cs", |
250 | }, | 246 | }, |
251 | .probe = sl811_cs_probe, | 247 | .probe = sl811_cs_probe, |
252 | .remove = sl811_cs_detach, | 248 | .remove = sl811_cs_detach, |