aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-09-22 15:54:53 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-22 16:01:40 -0400
commitae19ffbadc1b2100285a5b5b3d0a4e0a11390904 (patch)
tree3c2086ab67398a019089a47ca3f362a4bc6db74f /drivers/pcmcia
parent34e84f39a27d059a3e6ec6e8b94aafa702e6f220 (diff)
parent9173a8ef24a6b1b8031507b35b8ffe5f85a87692 (diff)
Merge branch 'master' into for-linus
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/au1000_pb1x00.c1
-rw-r--r--drivers/pcmcia/au1000_xxs1500.c1
-rw-r--r--drivers/pcmcia/ds.c3
-rw-r--r--drivers/pcmcia/o2micro.h4
-rw-r--r--drivers/pcmcia/pcmcia_ioctl.c2
-rw-r--r--drivers/pcmcia/pcmcia_resource.c6
-rw-r--r--drivers/pcmcia/yenta_socket.c16
7 files changed, 17 insertions, 16 deletions
diff --git a/drivers/pcmcia/au1000_pb1x00.c b/drivers/pcmcia/au1000_pb1x00.c
index d6b4bd1db7d7..b1984ed72d1d 100644
--- a/drivers/pcmcia/au1000_pb1x00.c
+++ b/drivers/pcmcia/au1000_pb1x00.c
@@ -26,7 +26,6 @@
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/ioport.h> 27#include <linux/ioport.h>
28#include <linux/kernel.h> 28#include <linux/kernel.h>
29#include <linux/tqueue.h>
30#include <linux/timer.h> 29#include <linux/timer.h>
31#include <linux/mm.h> 30#include <linux/mm.h>
32#include <linux/proc_fs.h> 31#include <linux/proc_fs.h>
diff --git a/drivers/pcmcia/au1000_xxs1500.c b/drivers/pcmcia/au1000_xxs1500.c
index 9627390835ca..b43d47b50819 100644
--- a/drivers/pcmcia/au1000_xxs1500.c
+++ b/drivers/pcmcia/au1000_xxs1500.c
@@ -30,7 +30,6 @@
30#include <linux/delay.h> 30#include <linux/delay.h>
31#include <linux/ioport.h> 31#include <linux/ioport.h>
32#include <linux/kernel.h> 32#include <linux/kernel.h>
33#include <linux/tqueue.h>
34#include <linux/timer.h> 33#include <linux/timer.h>
35#include <linux/mm.h> 34#include <linux/mm.h>
36#include <linux/proc_fs.h> 35#include <linux/proc_fs.h>
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 304ff6d5cf3b..9f300d3cb125 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -236,7 +236,6 @@ pcmcia_store_new_id(struct device_driver *driver, const char *buf, size_t count)
236 if (!dynid) 236 if (!dynid)
237 return -ENOMEM; 237 return -ENOMEM;
238 238
239 INIT_LIST_HEAD(&dynid->node);
240 dynid->id.match_flags = match_flags; 239 dynid->id.match_flags = match_flags;
241 dynid->id.manf_id = manf_id; 240 dynid->id.manf_id = manf_id;
242 dynid->id.card_id = card_id; 241 dynid->id.card_id = card_id;
@@ -246,7 +245,7 @@ pcmcia_store_new_id(struct device_driver *driver, const char *buf, size_t count)
246 memcpy(dynid->id.prod_id_hash, prod_id_hash, sizeof(__u32) * 4); 245 memcpy(dynid->id.prod_id_hash, prod_id_hash, sizeof(__u32) * 4);
247 246
248 spin_lock(&pdrv->dynids.lock); 247 spin_lock(&pdrv->dynids.lock);
249 list_add_tail(&pdrv->dynids.list, &dynid->node); 248 list_add_tail(&dynid->node, &pdrv->dynids.list);
250 spin_unlock(&pdrv->dynids.lock); 249 spin_unlock(&pdrv->dynids.lock);
251 250
252 if (get_driver(&pdrv->drv)) { 251 if (get_driver(&pdrv->drv)) {
diff --git a/drivers/pcmcia/o2micro.h b/drivers/pcmcia/o2micro.h
index 5554015a7813..72188c462c9c 100644
--- a/drivers/pcmcia/o2micro.h
+++ b/drivers/pcmcia/o2micro.h
@@ -48,6 +48,9 @@
48#ifndef PCI_DEVICE_ID_O2_6812 48#ifndef PCI_DEVICE_ID_O2_6812
49#define PCI_DEVICE_ID_O2_6812 0x6872 49#define PCI_DEVICE_ID_O2_6812 0x6872
50#endif 50#endif
51#ifndef PCI_DEVICE_ID_O2_6933
52#define PCI_DEVICE_ID_O2_6933 0x6933
53#endif
51 54
52/* Additional PCI configuration registers */ 55/* Additional PCI configuration registers */
53 56
@@ -154,6 +157,7 @@ static int o2micro_override(struct yenta_socket *socket)
154 case PCI_DEVICE_ID_O2_6812: 157 case PCI_DEVICE_ID_O2_6812:
155 case PCI_DEVICE_ID_O2_6832: 158 case PCI_DEVICE_ID_O2_6832:
156 case PCI_DEVICE_ID_O2_6836: 159 case PCI_DEVICE_ID_O2_6836:
160 case PCI_DEVICE_ID_O2_6933:
157 dev_printk(KERN_INFO, &socket->dev->dev, 161 dev_printk(KERN_INFO, &socket->dev->dev,
158 "Yenta O2: old bridge, disabling read " 162 "Yenta O2: old bridge, disabling read "
159 "prefetch/write burst\n"); 163 "prefetch/write burst\n");
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index 6095f8daecd7..7b424e0b0449 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -286,7 +286,7 @@ static int pccard_get_status(struct pcmcia_socket *s,
286 return 0; 286 return 0;
287} /* pccard_get_status */ 287} /* pccard_get_status */
288 288
289int pccard_get_configuration_info(struct pcmcia_socket *s, 289static int pccard_get_configuration_info(struct pcmcia_socket *s,
290 struct pcmcia_device *p_dev, 290 struct pcmcia_device *p_dev,
291 config_info_t *config) 291 config_info_t *config)
292{ 292{
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index f5d0ba8e22d5..d919e96c0afd 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -489,7 +489,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
489 pccard_io_map iomap; 489 pccard_io_map iomap;
490 490
491 if (!(s->state & SOCKET_PRESENT)) 491 if (!(s->state & SOCKET_PRESENT))
492 return -ENODEV;; 492 return -ENODEV;
493 493
494 if (req->IntType & INT_CARDBUS) { 494 if (req->IntType & INT_CARDBUS) {
495 ds_dbg(p_dev->socket, 0, "IntType may not be INT_CARDBUS\n"); 495 ds_dbg(p_dev->socket, 0, "IntType may not be INT_CARDBUS\n");
@@ -902,7 +902,7 @@ struct pcmcia_cfg_mem {
902 * 902 *
903 * pcmcia_loop_config() loops over all configuration options, and calls 903 * pcmcia_loop_config() loops over all configuration options, and calls
904 * the driver-specific conf_check() for each one, checking whether 904 * the driver-specific conf_check() for each one, checking whether
905 * it is a valid one. 905 * it is a valid one. Returns 0 on success or errorcode otherwise.
906 */ 906 */
907int pcmcia_loop_config(struct pcmcia_device *p_dev, 907int pcmcia_loop_config(struct pcmcia_device *p_dev,
908 int (*conf_check) (struct pcmcia_device *p_dev, 908 int (*conf_check) (struct pcmcia_device *p_dev,
@@ -915,7 +915,7 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev,
915 struct pcmcia_cfg_mem *cfg_mem; 915 struct pcmcia_cfg_mem *cfg_mem;
916 916
917 tuple_t *tuple; 917 tuple_t *tuple;
918 int ret = -ENODEV; 918 int ret;
919 unsigned int vcc; 919 unsigned int vcc;
920 920
921 cfg_mem = kzalloc(sizeof(struct pcmcia_cfg_mem), GFP_KERNEL); 921 cfg_mem = kzalloc(sizeof(struct pcmcia_cfg_mem), GFP_KERNEL);
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 3ecd7c99d8eb..737fe5d87c40 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -622,11 +622,12 @@ static int yenta_search_res(struct yenta_socket *socket, struct resource *res,
622 622
623static int yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned type, int addr_start, int addr_end) 623static int yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned type, int addr_start, int addr_end)
624{ 624{
625 struct resource *root, *res; 625 struct pci_dev *dev = socket->dev;
626 struct resource *res;
626 struct pci_bus_region region; 627 struct pci_bus_region region;
627 unsigned mask; 628 unsigned mask;
628 629
629 res = socket->dev->resource + PCI_BRIDGE_RESOURCES + nr; 630 res = dev->resource + PCI_BRIDGE_RESOURCES + nr;
630 /* Already allocated? */ 631 /* Already allocated? */
631 if (res->parent) 632 if (res->parent)
632 return 0; 633 return 0;
@@ -636,17 +637,16 @@ static int yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned type
636 if (type & IORESOURCE_IO) 637 if (type & IORESOURCE_IO)
637 mask = ~3; 638 mask = ~3;
638 639
639 res->name = socket->dev->subordinate->name; 640 res->name = dev->subordinate->name;
640 res->flags = type; 641 res->flags = type;
641 642
642 region.start = config_readl(socket, addr_start) & mask; 643 region.start = config_readl(socket, addr_start) & mask;
643 region.end = config_readl(socket, addr_end) | ~mask; 644 region.end = config_readl(socket, addr_end) | ~mask;
644 if (region.start && region.end > region.start && !override_bios) { 645 if (region.start && region.end > region.start && !override_bios) {
645 pcibios_bus_to_resource(socket->dev, res, &region); 646 pcibios_bus_to_resource(dev, res, &region);
646 root = pci_find_parent_resource(socket->dev, res); 647 if (pci_claim_resource(dev, PCI_BRIDGE_RESOURCES + nr) == 0)
647 if (root && (request_resource(root, res) == 0))
648 return 0; 648 return 0;
649 dev_printk(KERN_INFO, &socket->dev->dev, 649 dev_printk(KERN_INFO, &dev->dev,
650 "Preassigned resource %d busy or not available, " 650 "Preassigned resource %d busy or not available, "
651 "reconfiguring...\n", 651 "reconfiguring...\n",
652 nr); 652 nr);
@@ -672,7 +672,7 @@ static int yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned type
672 return 1; 672 return 1;
673 } 673 }
674 674
675 dev_printk(KERN_INFO, &socket->dev->dev, 675 dev_printk(KERN_INFO, &dev->dev,
676 "no resource of type %x available, trying to continue...\n", 676 "no resource of type %x available, trying to continue...\n",
677 type); 677 type);
678 res->start = res->end = res->flags = 0; 678 res->start = res->end = res->flags = 0;