aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/cardbus.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-14 15:33:02 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-14 15:33:02 -0500
commitfb1beb29b5c531b12485d7c32174a77120590481 (patch)
treecb7d1d9733d351ae0ec7acda4851b27acd10abca /drivers/pcmcia/cardbus.c
parent478e4e9d7a618379676b17e64583ff3622f2fec5 (diff)
parent9fea84f46a821aa1ff2d034ffda8ad33bff48015 (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: CodingStyle fixes pcmcia: remove unused IRQ_FIRST_SHARED
Diffstat (limited to 'drivers/pcmcia/cardbus.c')
-rw-r--r--drivers/pcmcia/cardbus.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c
index a73b040ddbfb..cdf50f3bc2df 100644
--- a/drivers/pcmcia/cardbus.c
+++ b/drivers/pcmcia/cardbus.c
@@ -27,8 +27,8 @@
27#include <linux/mm.h> 27#include <linux/mm.h>
28#include <linux/pci.h> 28#include <linux/pci.h>
29#include <linux/ioport.h> 29#include <linux/ioport.h>
30#include <linux/io.h>
30#include <asm/irq.h> 31#include <asm/irq.h>
31#include <asm/io.h>
32 32
33#include <pcmcia/cs_types.h> 33#include <pcmcia/cs_types.h>
34#include <pcmcia/ss.h> 34#include <pcmcia/ss.h>
@@ -58,7 +58,7 @@
58 image number and an offset within that image. xlate_rom_addr() 58 image number and an offset within that image. xlate_rom_addr()
59 converts an image/offset address to an absolute offset from the 59 converts an image/offset address to an absolute offset from the
60 ROM's base address. 60 ROM's base address.
61 61
62=====================================================================*/ 62=====================================================================*/
63 63
64static u_int xlate_rom_addr(void __iomem *b, u_int addr) 64static u_int xlate_rom_addr(void __iomem *b, u_int addr)
@@ -85,10 +85,10 @@ static u_int xlate_rom_addr(void __iomem *b, u_int addr)
85 These are similar to setup_cis_mem and release_cis_mem for 16-bit 85 These are similar to setup_cis_mem and release_cis_mem for 16-bit
86 cards. The "result" that is used externally is the cb_cis_virt 86 cards. The "result" that is used externally is the cb_cis_virt
87 pointer in the struct pcmcia_socket structure. 87 pointer in the struct pcmcia_socket structure.
88 88
89=====================================================================*/ 89=====================================================================*/
90 90
91static void cb_release_cis_mem(struct pcmcia_socket * s) 91static void cb_release_cis_mem(struct pcmcia_socket *s)
92{ 92{
93 if (s->cb_cis_virt) { 93 if (s->cb_cis_virt) {
94 dev_dbg(&s->dev, "cb_release_cis_mem()\n"); 94 dev_dbg(&s->dev, "cb_release_cis_mem()\n");
@@ -98,7 +98,7 @@ static void cb_release_cis_mem(struct pcmcia_socket * s)
98 } 98 }
99} 99}
100 100
101static int cb_setup_cis_mem(struct pcmcia_socket * s, struct resource *res) 101static int cb_setup_cis_mem(struct pcmcia_socket *s, struct resource *res)
102{ 102{
103 unsigned int start, size; 103 unsigned int start, size;
104 104
@@ -124,10 +124,11 @@ static int cb_setup_cis_mem(struct pcmcia_socket * s, struct resource *res)
124 124
125 This is used by the CIS processing code to read CIS information 125 This is used by the CIS processing code to read CIS information
126 from a CardBus device. 126 from a CardBus device.
127 127
128=====================================================================*/ 128=====================================================================*/
129 129
130int read_cb_mem(struct pcmcia_socket * s, int space, u_int addr, u_int len, void *ptr) 130int read_cb_mem(struct pcmcia_socket *s, int space, u_int addr, u_int len,
131 void *ptr)
131{ 132{
132 struct pci_dev *dev; 133 struct pci_dev *dev;
133 struct resource *res; 134 struct resource *res;
@@ -181,7 +182,7 @@ fail:
181 cb_alloc() and cb_free() allocate and free the kernel data 182 cb_alloc() and cb_free() allocate and free the kernel data
182 structures for a Cardbus device, and handle the lowest level PCI 183 structures for a Cardbus device, and handle the lowest level PCI
183 device setup issues. 184 device setup issues.
184 185
185=====================================================================*/ 186=====================================================================*/
186 187
187static void cardbus_config_irq_and_cls(struct pci_bus *bus, int irq) 188static void cardbus_config_irq_and_cls(struct pci_bus *bus, int irq)
@@ -214,14 +215,14 @@ static void cardbus_config_irq_and_cls(struct pci_bus *bus, int irq)
214 } 215 }
215} 216}
216 217
217int __ref cb_alloc(struct pcmcia_socket * s) 218int __ref cb_alloc(struct pcmcia_socket *s)
218{ 219{
219 struct pci_bus *bus = s->cb_dev->subordinate; 220 struct pci_bus *bus = s->cb_dev->subordinate;
220 struct pci_dev *dev; 221 struct pci_dev *dev;
221 unsigned int max, pass; 222 unsigned int max, pass;
222 223
223 s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0)); 224 s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0));
224// pcibios_fixup_bus(bus); 225/* pcibios_fixup_bus(bus); */
225 226
226 max = bus->secondary; 227 max = bus->secondary;
227 for (pass = 0; pass < 2; pass++) 228 for (pass = 0; pass < 2; pass++)
@@ -248,7 +249,7 @@ int __ref cb_alloc(struct pcmcia_socket * s)
248 return 0; 249 return 0;
249} 250}
250 251
251void cb_free(struct pcmcia_socket * s) 252void cb_free(struct pcmcia_socket *s)
252{ 253{
253 struct pci_dev *bridge = s->cb_dev; 254 struct pci_dev *bridge = s->cb_dev;
254 255