diff options
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/au1000_db1x00.c | 6 | ||||
-rw-r--r-- | drivers/pcmcia/au1000_generic.c | 11 | ||||
-rw-r--r-- | drivers/pcmcia/au1000_pb1x00.c | 14 | ||||
-rw-r--r-- | drivers/pcmcia/au1000_xxs1500.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/cardbus.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/ds.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/i82092.c | 6 | ||||
-rw-r--r-- | drivers/pcmcia/omap_cf.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/pd6729.c | 6 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_lubbock.c | 8 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_mainstone.c | 4 | ||||
-rw-r--r-- | drivers/pcmcia/rsrc_nonstatic.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_assabet.c | 4 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_badge4.c | 8 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_cerf.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_jornada720.c | 4 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_neponset.c | 4 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_shannon.c | 8 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_simpad.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/soc_common.c | 17 | ||||
-rw-r--r-- | drivers/pcmcia/soc_common.h | 1 |
21 files changed, 58 insertions, 57 deletions
diff --git a/drivers/pcmcia/au1000_db1x00.c b/drivers/pcmcia/au1000_db1x00.c index 74e051535d6..c78d77fd7e3 100644 --- a/drivers/pcmcia/au1000_db1x00.c +++ b/drivers/pcmcia/au1000_db1x00.c | |||
@@ -194,7 +194,7 @@ db1x00_pcmcia_configure_socket(struct au1000_pcmcia_socket *skt, struct socket_s | |||
194 | default: | 194 | default: |
195 | pwr |= SET_VCC_VPP(0,0,sock); | 195 | pwr |= SET_VCC_VPP(0,0,sock); |
196 | printk("%s: bad Vcc/Vpp (%d:%d)\n", | 196 | printk("%s: bad Vcc/Vpp (%d:%d)\n", |
197 | __FUNCTION__, | 197 | __func__, |
198 | state->Vcc, | 198 | state->Vcc, |
199 | state->Vpp); | 199 | state->Vpp); |
200 | break; | 200 | break; |
@@ -215,7 +215,7 @@ db1x00_pcmcia_configure_socket(struct au1000_pcmcia_socket *skt, struct socket_s | |||
215 | default: | 215 | default: |
216 | pwr |= SET_VCC_VPP(0,0,sock); | 216 | pwr |= SET_VCC_VPP(0,0,sock); |
217 | printk("%s: bad Vcc/Vpp (%d:%d)\n", | 217 | printk("%s: bad Vcc/Vpp (%d:%d)\n", |
218 | __FUNCTION__, | 218 | __func__, |
219 | state->Vcc, | 219 | state->Vcc, |
220 | state->Vpp); | 220 | state->Vpp); |
221 | break; | 221 | break; |
@@ -224,7 +224,7 @@ db1x00_pcmcia_configure_socket(struct au1000_pcmcia_socket *skt, struct socket_s | |||
224 | default: /* what's this ? */ | 224 | default: /* what's this ? */ |
225 | pwr |= SET_VCC_VPP(0,0,sock); | 225 | pwr |= SET_VCC_VPP(0,0,sock); |
226 | printk(KERN_ERR "%s: bad Vcc %d\n", | 226 | printk(KERN_ERR "%s: bad Vcc %d\n", |
227 | __FUNCTION__, state->Vcc); | 227 | __func__, state->Vcc); |
228 | break; | 228 | break; |
229 | } | 229 | } |
230 | 230 | ||
diff --git a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c index b693367d38c..75e8f8505e4 100644 --- a/drivers/pcmcia/au1000_generic.c +++ b/drivers/pcmcia/au1000_generic.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/notifier.h> | 41 | #include <linux/notifier.h> |
42 | #include <linux/interrupt.h> | 42 | #include <linux/interrupt.h> |
43 | #include <linux/spinlock.h> | 43 | #include <linux/spinlock.h> |
44 | #include <linux/mutex.h> | ||
44 | #include <linux/platform_device.h> | 45 | #include <linux/platform_device.h> |
45 | 46 | ||
46 | #include <asm/io.h> | 47 | #include <asm/io.h> |
@@ -71,7 +72,7 @@ extern struct au1000_pcmcia_socket au1000_pcmcia_socket[]; | |||
71 | u32 *pcmcia_base_vaddrs[2]; | 72 | u32 *pcmcia_base_vaddrs[2]; |
72 | extern const unsigned long mips_io_port_base; | 73 | extern const unsigned long mips_io_port_base; |
73 | 74 | ||
74 | DECLARE_MUTEX(pcmcia_sockets_lock); | 75 | static DEFINE_MUTEX(pcmcia_sockets_lock); |
75 | 76 | ||
76 | static int (*au1x00_pcmcia_hw_init[])(struct device *dev) = { | 77 | static int (*au1x00_pcmcia_hw_init[])(struct device *dev) = { |
77 | au1x_board_init, | 78 | au1x_board_init, |
@@ -472,7 +473,7 @@ int au1x00_drv_pcmcia_remove(struct device *dev) | |||
472 | struct skt_dev_info *sinfo = dev_get_drvdata(dev); | 473 | struct skt_dev_info *sinfo = dev_get_drvdata(dev); |
473 | int i; | 474 | int i; |
474 | 475 | ||
475 | down(&pcmcia_sockets_lock); | 476 | mutex_lock(&pcmcia_sockets_lock); |
476 | dev_set_drvdata(dev, NULL); | 477 | dev_set_drvdata(dev, NULL); |
477 | 478 | ||
478 | for (i = 0; i < sinfo->nskt; i++) { | 479 | for (i = 0; i < sinfo->nskt; i++) { |
@@ -488,7 +489,7 @@ int au1x00_drv_pcmcia_remove(struct device *dev) | |||
488 | } | 489 | } |
489 | 490 | ||
490 | kfree(sinfo); | 491 | kfree(sinfo); |
491 | up(&pcmcia_sockets_lock); | 492 | mutex_unlock(&pcmcia_sockets_lock); |
492 | return 0; | 493 | return 0; |
493 | } | 494 | } |
494 | 495 | ||
@@ -501,13 +502,13 @@ static int au1x00_drv_pcmcia_probe(struct device *dev) | |||
501 | { | 502 | { |
502 | int i, ret = -ENODEV; | 503 | int i, ret = -ENODEV; |
503 | 504 | ||
504 | down(&pcmcia_sockets_lock); | 505 | mutex_lock(&pcmcia_sockets_lock); |
505 | for (i=0; i < ARRAY_SIZE(au1x00_pcmcia_hw_init); i++) { | 506 | for (i=0; i < ARRAY_SIZE(au1x00_pcmcia_hw_init); i++) { |
506 | ret = au1x00_pcmcia_hw_init[i](dev); | 507 | ret = au1x00_pcmcia_hw_init[i](dev); |
507 | if (ret == 0) | 508 | if (ret == 0) |
508 | break; | 509 | break; |
509 | } | 510 | } |
510 | up(&pcmcia_sockets_lock); | 511 | mutex_unlock(&pcmcia_sockets_lock); |
511 | return ret; | 512 | return ret; |
512 | } | 513 | } |
513 | 514 | ||
diff --git a/drivers/pcmcia/au1000_pb1x00.c b/drivers/pcmcia/au1000_pb1x00.c index 86c0808d6a0..157e41423a0 100644 --- a/drivers/pcmcia/au1000_pb1x00.c +++ b/drivers/pcmcia/au1000_pb1x00.c | |||
@@ -244,7 +244,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure) | |||
244 | pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ, | 244 | pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ, |
245 | configure->sock); | 245 | configure->sock); |
246 | printk("%s: bad Vcc/Vpp (%d:%d)\n", | 246 | printk("%s: bad Vcc/Vpp (%d:%d)\n", |
247 | __FUNCTION__, | 247 | __func__, |
248 | configure->vcc, | 248 | configure->vcc, |
249 | configure->vpp); | 249 | configure->vpp); |
250 | break; | 250 | break; |
@@ -272,7 +272,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure) | |||
272 | pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ, | 272 | pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ, |
273 | configure->sock); | 273 | configure->sock); |
274 | printk("%s: bad Vcc/Vpp (%d:%d)\n", | 274 | printk("%s: bad Vcc/Vpp (%d:%d)\n", |
275 | __FUNCTION__, | 275 | __func__, |
276 | configure->vcc, | 276 | configure->vcc, |
277 | configure->vpp); | 277 | configure->vpp); |
278 | break; | 278 | break; |
@@ -300,7 +300,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure) | |||
300 | pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ, | 300 | pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ, |
301 | configure->sock); | 301 | configure->sock); |
302 | printk("%s: bad Vcc/Vpp (%d:%d)\n", | 302 | printk("%s: bad Vcc/Vpp (%d:%d)\n", |
303 | __FUNCTION__, | 303 | __func__, |
304 | configure->vcc, | 304 | configure->vcc, |
305 | configure->vpp); | 305 | configure->vpp); |
306 | break; | 306 | break; |
@@ -309,7 +309,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure) | |||
309 | default: /* what's this ? */ | 309 | default: /* what's this ? */ |
310 | pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ,configure->sock); | 310 | pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ,configure->sock); |
311 | printk(KERN_ERR "%s: bad Vcc %d\n", | 311 | printk(KERN_ERR "%s: bad Vcc %d\n", |
312 | __FUNCTION__, configure->vcc); | 312 | __func__, configure->vcc); |
313 | break; | 313 | break; |
314 | } | 314 | } |
315 | 315 | ||
@@ -353,7 +353,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure) | |||
353 | default: | 353 | default: |
354 | pcr |= SET_VCC_VPP(0,0); | 354 | pcr |= SET_VCC_VPP(0,0); |
355 | printk("%s: bad Vcc/Vpp (%d:%d)\n", | 355 | printk("%s: bad Vcc/Vpp (%d:%d)\n", |
356 | __FUNCTION__, | 356 | __func__, |
357 | configure->vcc, | 357 | configure->vcc, |
358 | configure->vpp); | 358 | configure->vpp); |
359 | break; | 359 | break; |
@@ -374,7 +374,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure) | |||
374 | default: | 374 | default: |
375 | pcr |= SET_VCC_VPP(0,0); | 375 | pcr |= SET_VCC_VPP(0,0); |
376 | printk("%s: bad Vcc/Vpp (%d:%d)\n", | 376 | printk("%s: bad Vcc/Vpp (%d:%d)\n", |
377 | __FUNCTION__, | 377 | __func__, |
378 | configure->vcc, | 378 | configure->vcc, |
379 | configure->vpp); | 379 | configure->vpp); |
380 | break; | 380 | break; |
@@ -383,7 +383,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure) | |||
383 | default: /* what's this ? */ | 383 | default: /* what's this ? */ |
384 | pcr |= SET_VCC_VPP(0,0); | 384 | pcr |= SET_VCC_VPP(0,0); |
385 | printk(KERN_ERR "%s: bad Vcc %d\n", | 385 | printk(KERN_ERR "%s: bad Vcc %d\n", |
386 | __FUNCTION__, configure->vcc); | 386 | __func__, configure->vcc); |
387 | break; | 387 | break; |
388 | } | 388 | } |
389 | 389 | ||
diff --git a/drivers/pcmcia/au1000_xxs1500.c b/drivers/pcmcia/au1000_xxs1500.c index ce9d5c44a7b..c78ed534751 100644 --- a/drivers/pcmcia/au1000_xxs1500.c +++ b/drivers/pcmcia/au1000_xxs1500.c | |||
@@ -56,7 +56,7 @@ | |||
56 | #define PCMCIA_IRQ AU1000_GPIO_4 | 56 | #define PCMCIA_IRQ AU1000_GPIO_4 |
57 | 57 | ||
58 | #if 0 | 58 | #if 0 |
59 | #define DEBUG(x,args...) printk(__FUNCTION__ ": " x,##args) | 59 | #define DEBUG(x, args...) printk(__func__ ": " x, ##args) |
60 | #else | 60 | #else |
61 | #define DEBUG(x,args...) | 61 | #define DEBUG(x,args...) |
62 | #endif | 62 | #endif |
diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c index 714baaeb6da..fb2f38dc92c 100644 --- a/drivers/pcmcia/cardbus.c +++ b/drivers/pcmcia/cardbus.c | |||
@@ -209,7 +209,7 @@ static void cardbus_assign_irqs(struct pci_bus *bus, int irq) | |||
209 | } | 209 | } |
210 | } | 210 | } |
211 | 211 | ||
212 | int cb_alloc(struct pcmcia_socket * s) | 212 | int __ref cb_alloc(struct pcmcia_socket * s) |
213 | { | 213 | { |
214 | struct pci_bus *bus = s->cb_dev->subordinate; | 214 | struct pci_bus *bus = s->cb_dev->subordinate; |
215 | struct pci_dev *dev; | 215 | struct pci_dev *dev; |
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 5a85871f5ee..e40775443d0 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -1520,7 +1520,7 @@ static void pcmcia_bus_remove_socket(struct device *dev, | |||
1520 | 1520 | ||
1521 | 1521 | ||
1522 | /* the pcmcia_bus_interface is used to handle pcmcia socket devices */ | 1522 | /* the pcmcia_bus_interface is used to handle pcmcia socket devices */ |
1523 | static struct class_interface pcmcia_bus_interface = { | 1523 | static struct class_interface pcmcia_bus_interface __refdata = { |
1524 | .class = &pcmcia_socket_class, | 1524 | .class = &pcmcia_socket_class, |
1525 | .add_dev = &pcmcia_bus_add_socket, | 1525 | .add_dev = &pcmcia_bus_add_socket, |
1526 | .remove_dev = &pcmcia_bus_remove_socket, | 1526 | .remove_dev = &pcmcia_bus_remove_socket, |
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c index e54ecc580d9..e13618656ff 100644 --- a/drivers/pcmcia/i82092.c +++ b/drivers/pcmcia/i82092.c | |||
@@ -53,7 +53,7 @@ static int i82092aa_socket_resume (struct pci_dev *dev) | |||
53 | } | 53 | } |
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | static struct pci_driver i82092aa_pci_drv = { | 56 | static struct pci_driver i82092aa_pci_driver = { |
57 | .name = "i82092aa", | 57 | .name = "i82092aa", |
58 | .id_table = i82092aa_pci_ids, | 58 | .id_table = i82092aa_pci_ids, |
59 | .probe = i82092aa_pci_probe, | 59 | .probe = i82092aa_pci_probe, |
@@ -714,13 +714,13 @@ static int i82092aa_set_mem_map(struct pcmcia_socket *socket, struct pccard_mem_ | |||
714 | 714 | ||
715 | static int i82092aa_module_init(void) | 715 | static int i82092aa_module_init(void) |
716 | { | 716 | { |
717 | return pci_register_driver(&i82092aa_pci_drv); | 717 | return pci_register_driver(&i82092aa_pci_driver); |
718 | } | 718 | } |
719 | 719 | ||
720 | static void i82092aa_module_exit(void) | 720 | static void i82092aa_module_exit(void) |
721 | { | 721 | { |
722 | enter("i82092aa_module_exit"); | 722 | enter("i82092aa_module_exit"); |
723 | pci_unregister_driver(&i82092aa_pci_drv); | 723 | pci_unregister_driver(&i82092aa_pci_driver); |
724 | if (sockets[0].io_base>0) | 724 | if (sockets[0].io_base>0) |
725 | release_region(sockets[0].io_base, 2); | 725 | release_region(sockets[0].io_base, 2); |
726 | leave("i82092aa_module_exit"); | 726 | leave("i82092aa_module_exit"); |
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c index bb6db3a582b..46314b42076 100644 --- a/drivers/pcmcia/omap_cf.c +++ b/drivers/pcmcia/omap_cf.c | |||
@@ -153,7 +153,7 @@ omap_cf_set_socket(struct pcmcia_socket *sock, struct socket_state_t *s) | |||
153 | 153 | ||
154 | static int omap_cf_ss_suspend(struct pcmcia_socket *s) | 154 | static int omap_cf_ss_suspend(struct pcmcia_socket *s) |
155 | { | 155 | { |
156 | pr_debug("%s: %s\n", driver_name, __FUNCTION__); | 156 | pr_debug("%s: %s\n", driver_name, __func__); |
157 | return omap_cf_set_socket(s, &dead_socket); | 157 | return omap_cf_set_socket(s, &dead_socket); |
158 | } | 158 | } |
159 | 159 | ||
diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c index abc10fe49bd..8bed1dab903 100644 --- a/drivers/pcmcia/pd6729.c +++ b/drivers/pcmcia/pd6729.c | |||
@@ -778,7 +778,7 @@ static struct pci_device_id pd6729_pci_ids[] = { | |||
778 | }; | 778 | }; |
779 | MODULE_DEVICE_TABLE(pci, pd6729_pci_ids); | 779 | MODULE_DEVICE_TABLE(pci, pd6729_pci_ids); |
780 | 780 | ||
781 | static struct pci_driver pd6729_pci_drv = { | 781 | static struct pci_driver pd6729_pci_driver = { |
782 | .name = "pd6729", | 782 | .name = "pd6729", |
783 | .id_table = pd6729_pci_ids, | 783 | .id_table = pd6729_pci_ids, |
784 | .probe = pd6729_pci_probe, | 784 | .probe = pd6729_pci_probe, |
@@ -791,12 +791,12 @@ static struct pci_driver pd6729_pci_drv = { | |||
791 | 791 | ||
792 | static int pd6729_module_init(void) | 792 | static int pd6729_module_init(void) |
793 | { | 793 | { |
794 | return pci_register_driver(&pd6729_pci_drv); | 794 | return pci_register_driver(&pd6729_pci_driver); |
795 | } | 795 | } |
796 | 796 | ||
797 | static void pd6729_module_exit(void) | 797 | static void pd6729_module_exit(void) |
798 | { | 798 | { |
799 | pci_unregister_driver(&pd6729_pci_drv); | 799 | pci_unregister_driver(&pd6729_pci_driver); |
800 | } | 800 | } |
801 | 801 | ||
802 | module_init(pd6729_module_init); | 802 | module_init(pd6729_module_init); |
diff --git a/drivers/pcmcia/pxa2xx_lubbock.c b/drivers/pcmcia/pxa2xx_lubbock.c index 4a05802213c..881ec8a8e38 100644 --- a/drivers/pcmcia/pxa2xx_lubbock.c +++ b/drivers/pcmcia/pxa2xx_lubbock.c | |||
@@ -87,7 +87,7 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | |||
87 | 87 | ||
88 | default: | 88 | default: |
89 | printk(KERN_ERR "%s(): unrecognized Vcc %u\n", | 89 | printk(KERN_ERR "%s(): unrecognized Vcc %u\n", |
90 | __FUNCTION__, state->Vcc); | 90 | __func__, state->Vcc); |
91 | ret = -1; | 91 | ret = -1; |
92 | } | 92 | } |
93 | 93 | ||
@@ -104,7 +104,7 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | |||
104 | pa_dwr_set |= GPIO_A0; | 104 | pa_dwr_set |= GPIO_A0; |
105 | else { | 105 | else { |
106 | printk(KERN_ERR "%s(): unrecognized Vpp %u\n", | 106 | printk(KERN_ERR "%s(): unrecognized Vpp %u\n", |
107 | __FUNCTION__, state->Vpp); | 107 | __func__, state->Vpp); |
108 | ret = -1; | 108 | ret = -1; |
109 | break; | 109 | break; |
110 | } | 110 | } |
@@ -128,14 +128,14 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | |||
128 | 128 | ||
129 | default: | 129 | default: |
130 | printk(KERN_ERR "%s(): unrecognized Vcc %u\n", | 130 | printk(KERN_ERR "%s(): unrecognized Vcc %u\n", |
131 | __FUNCTION__, state->Vcc); | 131 | __func__, state->Vcc); |
132 | ret = -1; | 132 | ret = -1; |
133 | break; | 133 | break; |
134 | } | 134 | } |
135 | 135 | ||
136 | if (state->Vpp != state->Vcc && state->Vpp != 0) { | 136 | if (state->Vpp != state->Vcc && state->Vpp != 0) { |
137 | printk(KERN_ERR "%s(): CF slot cannot support Vpp %u\n", | 137 | printk(KERN_ERR "%s(): CF slot cannot support Vpp %u\n", |
138 | __FUNCTION__, state->Vpp); | 138 | __func__, state->Vpp); |
139 | ret = -1; | 139 | ret = -1; |
140 | break; | 140 | break; |
141 | } | 141 | } |
diff --git a/drivers/pcmcia/pxa2xx_mainstone.c b/drivers/pcmcia/pxa2xx_mainstone.c index 6fa5eaaab8a..145b85e0f02 100644 --- a/drivers/pcmcia/pxa2xx_mainstone.c +++ b/drivers/pcmcia/pxa2xx_mainstone.c | |||
@@ -99,7 +99,7 @@ static int mst_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | |||
99 | case 50: power |= MST_PCMCIA_PWR_VCC_50; break; | 99 | case 50: power |= MST_PCMCIA_PWR_VCC_50; break; |
100 | default: | 100 | default: |
101 | printk(KERN_ERR "%s(): bad Vcc %u\n", | 101 | printk(KERN_ERR "%s(): bad Vcc %u\n", |
102 | __FUNCTION__, state->Vcc); | 102 | __func__, state->Vcc); |
103 | ret = -1; | 103 | ret = -1; |
104 | } | 104 | } |
105 | 105 | ||
@@ -111,7 +111,7 @@ static int mst_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | |||
111 | power |= MST_PCMCIA_PWR_VPP_VCC; | 111 | power |= MST_PCMCIA_PWR_VPP_VCC; |
112 | } else { | 112 | } else { |
113 | printk(KERN_ERR "%s(): bad Vpp %u\n", | 113 | printk(KERN_ERR "%s(): bad Vpp %u\n", |
114 | __FUNCTION__, state->Vpp); | 114 | __func__, state->Vpp); |
115 | ret = -1; | 115 | ret = -1; |
116 | } | 116 | } |
117 | } | 117 | } |
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index a8d10070772..0fcf763b917 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c | |||
@@ -1045,7 +1045,7 @@ static void __devexit pccard_sysfs_remove_rsrc(struct device *dev, | |||
1045 | device_remove_file(dev, *attr); | 1045 | device_remove_file(dev, *attr); |
1046 | } | 1046 | } |
1047 | 1047 | ||
1048 | static struct class_interface pccard_rsrc_interface = { | 1048 | static struct class_interface pccard_rsrc_interface __refdata = { |
1049 | .class = &pcmcia_socket_class, | 1049 | .class = &pcmcia_socket_class, |
1050 | .add_dev = &pccard_sysfs_add_rsrc, | 1050 | .add_dev = &pccard_sysfs_add_rsrc, |
1051 | .remove_dev = __devexit_p(&pccard_sysfs_remove_rsrc), | 1051 | .remove_dev = __devexit_p(&pccard_sysfs_remove_rsrc), |
diff --git a/drivers/pcmcia/sa1100_assabet.c b/drivers/pcmcia/sa1100_assabet.c index 7c57fdd3c8d..ce133ce81c1 100644 --- a/drivers/pcmcia/sa1100_assabet.c +++ b/drivers/pcmcia/sa1100_assabet.c | |||
@@ -66,14 +66,14 @@ assabet_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_stat | |||
66 | 66 | ||
67 | case 50: | 67 | case 50: |
68 | printk(KERN_WARNING "%s(): CS asked for 5V, applying 3.3V...\n", | 68 | printk(KERN_WARNING "%s(): CS asked for 5V, applying 3.3V...\n", |
69 | __FUNCTION__); | 69 | __func__); |
70 | 70 | ||
71 | case 33: /* Can only apply 3.3V to the CF slot. */ | 71 | case 33: /* Can only apply 3.3V to the CF slot. */ |
72 | mask = ASSABET_BCR_CF_PWR; | 72 | mask = ASSABET_BCR_CF_PWR; |
73 | break; | 73 | break; |
74 | 74 | ||
75 | default: | 75 | default: |
76 | printk(KERN_ERR "%s(): unrecognized Vcc %u\n", __FUNCTION__, | 76 | printk(KERN_ERR "%s(): unrecognized Vcc %u\n", __func__, |
77 | state->Vcc); | 77 | state->Vcc); |
78 | return -1; | 78 | return -1; |
79 | } | 79 | } |
diff --git a/drivers/pcmcia/sa1100_badge4.c b/drivers/pcmcia/sa1100_badge4.c index 62bfc7566ec..607c3f326ec 100644 --- a/drivers/pcmcia/sa1100_badge4.c +++ b/drivers/pcmcia/sa1100_badge4.c | |||
@@ -82,14 +82,14 @@ badge4_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state | |||
82 | case 0: | 82 | case 0: |
83 | if ((state->Vcc != 0) && | 83 | if ((state->Vcc != 0) && |
84 | (state->Vcc != badge4_pcmvcc)) { | 84 | (state->Vcc != badge4_pcmvcc)) { |
85 | complain_about_jumpering(__FUNCTION__, "pcmvcc", | 85 | complain_about_jumpering(__func__, "pcmvcc", |
86 | badge4_pcmvcc, state->Vcc); | 86 | badge4_pcmvcc, state->Vcc); |
87 | // Apply power regardless of the jumpering. | 87 | // Apply power regardless of the jumpering. |
88 | // return -1; | 88 | // return -1; |
89 | } | 89 | } |
90 | if ((state->Vpp != 0) && | 90 | if ((state->Vpp != 0) && |
91 | (state->Vpp != badge4_pcmvpp)) { | 91 | (state->Vpp != badge4_pcmvpp)) { |
92 | complain_about_jumpering(__FUNCTION__, "pcmvpp", | 92 | complain_about_jumpering(__func__, "pcmvpp", |
93 | badge4_pcmvpp, state->Vpp); | 93 | badge4_pcmvpp, state->Vpp); |
94 | return -1; | 94 | return -1; |
95 | } | 95 | } |
@@ -98,7 +98,7 @@ badge4_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state | |||
98 | case 1: | 98 | case 1: |
99 | if ((state->Vcc != 0) && | 99 | if ((state->Vcc != 0) && |
100 | (state->Vcc != badge4_cfvcc)) { | 100 | (state->Vcc != badge4_cfvcc)) { |
101 | complain_about_jumpering(__FUNCTION__, "cfvcc", | 101 | complain_about_jumpering(__func__, "cfvcc", |
102 | badge4_cfvcc, state->Vcc); | 102 | badge4_cfvcc, state->Vcc); |
103 | return -1; | 103 | return -1; |
104 | } | 104 | } |
@@ -143,7 +143,7 @@ int pcmcia_badge4_init(struct device *dev) | |||
143 | if (machine_is_badge4()) { | 143 | if (machine_is_badge4()) { |
144 | printk(KERN_INFO | 144 | printk(KERN_INFO |
145 | "%s: badge4_pcmvcc=%d, badge4_pcmvpp=%d, badge4_cfvcc=%d\n", | 145 | "%s: badge4_pcmvcc=%d, badge4_pcmvpp=%d, badge4_cfvcc=%d\n", |
146 | __FUNCTION__, | 146 | __func__, |
147 | badge4_pcmvcc, badge4_pcmvpp, badge4_cfvcc); | 147 | badge4_pcmvcc, badge4_pcmvpp, badge4_cfvcc); |
148 | 148 | ||
149 | ret = sa11xx_drv_pcmcia_probe(dev, &badge4_pcmcia_ops, 0, 2); | 149 | ret = sa11xx_drv_pcmcia_probe(dev, &badge4_pcmcia_ops, 0, 2); |
diff --git a/drivers/pcmcia/sa1100_cerf.c b/drivers/pcmcia/sa1100_cerf.c index 549a1529fe3..7c3951a2675 100644 --- a/drivers/pcmcia/sa1100_cerf.c +++ b/drivers/pcmcia/sa1100_cerf.c | |||
@@ -63,7 +63,7 @@ cerf_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | |||
63 | 63 | ||
64 | default: | 64 | default: |
65 | printk(KERN_ERR "%s(): unrecognized Vcc %u\n", | 65 | printk(KERN_ERR "%s(): unrecognized Vcc %u\n", |
66 | __FUNCTION__, state->Vcc); | 66 | __func__, state->Vcc); |
67 | return -1; | 67 | return -1; |
68 | } | 68 | } |
69 | 69 | ||
diff --git a/drivers/pcmcia/sa1100_jornada720.c b/drivers/pcmcia/sa1100_jornada720.c index 6284c35dabc..2167e6714d2 100644 --- a/drivers/pcmcia/sa1100_jornada720.c +++ b/drivers/pcmcia/sa1100_jornada720.c | |||
@@ -42,7 +42,7 @@ jornada720_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_s | |||
42 | unsigned int pa_dwr_mask, pa_dwr_set; | 42 | unsigned int pa_dwr_mask, pa_dwr_set; |
43 | int ret; | 43 | int ret; |
44 | 44 | ||
45 | printk("%s(): config socket %d vcc %d vpp %d\n", __FUNCTION__, | 45 | printk("%s(): config socket %d vcc %d vpp %d\n", __func__, |
46 | skt->nr, state->Vcc, state->Vpp); | 46 | skt->nr, state->Vcc, state->Vpp); |
47 | 47 | ||
48 | switch (skt->nr) { | 48 | switch (skt->nr) { |
@@ -74,7 +74,7 @@ printk("%s(): config socket %d vcc %d vpp %d\n", __FUNCTION__, | |||
74 | 74 | ||
75 | if (state->Vpp != state->Vcc && state->Vpp != 0) { | 75 | if (state->Vpp != state->Vcc && state->Vpp != 0) { |
76 | printk(KERN_ERR "%s(): slot cannot support VPP %u\n", | 76 | printk(KERN_ERR "%s(): slot cannot support VPP %u\n", |
77 | __FUNCTION__, state->Vpp); | 77 | __func__, state->Vpp); |
78 | return -1; | 78 | return -1; |
79 | } | 79 | } |
80 | 80 | ||
diff --git a/drivers/pcmcia/sa1100_neponset.c b/drivers/pcmcia/sa1100_neponset.c index 5bc9e9532b9..687492fcd5b 100644 --- a/drivers/pcmcia/sa1100_neponset.c +++ b/drivers/pcmcia/sa1100_neponset.c | |||
@@ -59,7 +59,7 @@ neponset_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_sta | |||
59 | ncr_set = NCR_A0VPP; | 59 | ncr_set = NCR_A0VPP; |
60 | else { | 60 | else { |
61 | printk(KERN_ERR "%s(): unrecognized VPP %u\n", | 61 | printk(KERN_ERR "%s(): unrecognized VPP %u\n", |
62 | __FUNCTION__, state->Vpp); | 62 | __func__, state->Vpp); |
63 | return -1; | 63 | return -1; |
64 | } | 64 | } |
65 | break; | 65 | break; |
@@ -71,7 +71,7 @@ neponset_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_sta | |||
71 | 71 | ||
72 | if (state->Vpp != state->Vcc && state->Vpp != 0) { | 72 | if (state->Vpp != state->Vcc && state->Vpp != 0) { |
73 | printk(KERN_ERR "%s(): CF slot cannot support VPP %u\n", | 73 | printk(KERN_ERR "%s(): CF slot cannot support VPP %u\n", |
74 | __FUNCTION__, state->Vpp); | 74 | __func__, state->Vpp); |
75 | return -1; | 75 | return -1; |
76 | } | 76 | } |
77 | break; | 77 | break; |
diff --git a/drivers/pcmcia/sa1100_shannon.c b/drivers/pcmcia/sa1100_shannon.c index 9456f5478d0..494912fccc0 100644 --- a/drivers/pcmcia/sa1100_shannon.c +++ b/drivers/pcmcia/sa1100_shannon.c | |||
@@ -73,19 +73,19 @@ shannon_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | |||
73 | { | 73 | { |
74 | switch (state->Vcc) { | 74 | switch (state->Vcc) { |
75 | case 0: /* power off */ | 75 | case 0: /* power off */ |
76 | printk(KERN_WARNING "%s(): CS asked for 0V, still applying 3.3V..\n", __FUNCTION__); | 76 | printk(KERN_WARNING "%s(): CS asked for 0V, still applying 3.3V..\n", __func__); |
77 | break; | 77 | break; |
78 | case 50: | 78 | case 50: |
79 | printk(KERN_WARNING "%s(): CS asked for 5V, applying 3.3V..\n", __FUNCTION__); | 79 | printk(KERN_WARNING "%s(): CS asked for 5V, applying 3.3V..\n", __func__); |
80 | case 33: | 80 | case 33: |
81 | break; | 81 | break; |
82 | default: | 82 | default: |
83 | printk(KERN_ERR "%s(): unrecognized Vcc %u\n", | 83 | printk(KERN_ERR "%s(): unrecognized Vcc %u\n", |
84 | __FUNCTION__, state->Vcc); | 84 | __func__, state->Vcc); |
85 | return -1; | 85 | return -1; |
86 | } | 86 | } |
87 | 87 | ||
88 | printk(KERN_WARNING "%s(): Warning, Can't perform reset\n", __FUNCTION__); | 88 | printk(KERN_WARNING "%s(): Warning, Can't perform reset\n", __func__); |
89 | 89 | ||
90 | /* Silently ignore Vpp, output enable, speaker enable. */ | 90 | /* Silently ignore Vpp, output enable, speaker enable. */ |
91 | 91 | ||
diff --git a/drivers/pcmcia/sa1100_simpad.c b/drivers/pcmcia/sa1100_simpad.c index 04d6f7f75f7..42567de894b 100644 --- a/drivers/pcmcia/sa1100_simpad.c +++ b/drivers/pcmcia/sa1100_simpad.c | |||
@@ -90,7 +90,7 @@ simpad_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | |||
90 | 90 | ||
91 | default: | 91 | default: |
92 | printk(KERN_ERR "%s(): unrecognized Vcc %u\n", | 92 | printk(KERN_ERR "%s(): unrecognized Vcc %u\n", |
93 | __FUNCTION__, state->Vcc); | 93 | __func__, state->Vcc); |
94 | clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); | 94 | clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); |
95 | local_irq_restore(flags); | 95 | local_irq_restore(flags); |
96 | return -1; | 96 | return -1; |
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index aa7779d8975..420a77540f4 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
38 | #include <linux/timer.h> | 38 | #include <linux/timer.h> |
39 | #include <linux/mm.h> | 39 | #include <linux/mm.h> |
40 | #include <linux/mutex.h> | ||
40 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
41 | #include <linux/irq.h> | 42 | #include <linux/irq.h> |
42 | #include <linux/spinlock.h> | 43 | #include <linux/spinlock.h> |
@@ -353,7 +354,7 @@ soc_common_pcmcia_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *m | |||
353 | (map->flags&MAP_PREFETCH)?"PREFETCH ":""); | 354 | (map->flags&MAP_PREFETCH)?"PREFETCH ":""); |
354 | 355 | ||
355 | if (map->map >= MAX_IO_WIN) { | 356 | if (map->map >= MAX_IO_WIN) { |
356 | printk(KERN_ERR "%s(): map (%d) out of range\n", __FUNCTION__, | 357 | printk(KERN_ERR "%s(): map (%d) out of range\n", __func__, |
357 | map->map); | 358 | map->map); |
358 | return -1; | 359 | return -1; |
359 | } | 360 | } |
@@ -578,7 +579,7 @@ EXPORT_SYMBOL(soc_pcmcia_enable_irqs); | |||
578 | 579 | ||
579 | 580 | ||
580 | LIST_HEAD(soc_pcmcia_sockets); | 581 | LIST_HEAD(soc_pcmcia_sockets); |
581 | DECLARE_MUTEX(soc_pcmcia_sockets_lock); | 582 | static DEFINE_MUTEX(soc_pcmcia_sockets_lock); |
582 | 583 | ||
583 | static const char *skt_names[] = { | 584 | static const char *skt_names[] = { |
584 | "PCMCIA socket 0", | 585 | "PCMCIA socket 0", |
@@ -601,11 +602,11 @@ soc_pcmcia_notifier(struct notifier_block *nb, unsigned long val, void *data) | |||
601 | struct cpufreq_freqs *freqs = data; | 602 | struct cpufreq_freqs *freqs = data; |
602 | int ret = 0; | 603 | int ret = 0; |
603 | 604 | ||
604 | down(&soc_pcmcia_sockets_lock); | 605 | mutex_lock(&soc_pcmcia_sockets_lock); |
605 | list_for_each_entry(skt, &soc_pcmcia_sockets, node) | 606 | list_for_each_entry(skt, &soc_pcmcia_sockets, node) |
606 | if ( skt->ops->frequency_change ) | 607 | if ( skt->ops->frequency_change ) |
607 | ret += skt->ops->frequency_change(skt, val, freqs); | 608 | ret += skt->ops->frequency_change(skt, val, freqs); |
608 | up(&soc_pcmcia_sockets_lock); | 609 | mutex_unlock(&soc_pcmcia_sockets_lock); |
609 | 610 | ||
610 | return ret; | 611 | return ret; |
611 | } | 612 | } |
@@ -642,7 +643,7 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops | |||
642 | struct soc_pcmcia_socket *skt; | 643 | struct soc_pcmcia_socket *skt; |
643 | int ret, i; | 644 | int ret, i; |
644 | 645 | ||
645 | down(&soc_pcmcia_sockets_lock); | 646 | mutex_lock(&soc_pcmcia_sockets_lock); |
646 | 647 | ||
647 | sinfo = kzalloc(SKT_DEV_INFO_SIZE(nr), GFP_KERNEL); | 648 | sinfo = kzalloc(SKT_DEV_INFO_SIZE(nr), GFP_KERNEL); |
648 | if (!sinfo) { | 649 | if (!sinfo) { |
@@ -782,7 +783,7 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops | |||
782 | kfree(sinfo); | 783 | kfree(sinfo); |
783 | 784 | ||
784 | out: | 785 | out: |
785 | up(&soc_pcmcia_sockets_lock); | 786 | mutex_unlock(&soc_pcmcia_sockets_lock); |
786 | return ret; | 787 | return ret; |
787 | } | 788 | } |
788 | 789 | ||
@@ -793,7 +794,7 @@ int soc_common_drv_pcmcia_remove(struct device *dev) | |||
793 | 794 | ||
794 | dev_set_drvdata(dev, NULL); | 795 | dev_set_drvdata(dev, NULL); |
795 | 796 | ||
796 | down(&soc_pcmcia_sockets_lock); | 797 | mutex_lock(&soc_pcmcia_sockets_lock); |
797 | for (i = 0; i < sinfo->nskt; i++) { | 798 | for (i = 0; i < sinfo->nskt; i++) { |
798 | struct soc_pcmcia_socket *skt = &sinfo->skt[i]; | 799 | struct soc_pcmcia_socket *skt = &sinfo->skt[i]; |
799 | 800 | ||
@@ -818,7 +819,7 @@ int soc_common_drv_pcmcia_remove(struct device *dev) | |||
818 | if (list_empty(&soc_pcmcia_sockets)) | 819 | if (list_empty(&soc_pcmcia_sockets)) |
819 | soc_pcmcia_cpufreq_unregister(); | 820 | soc_pcmcia_cpufreq_unregister(); |
820 | 821 | ||
821 | up(&soc_pcmcia_sockets_lock); | 822 | mutex_unlock(&soc_pcmcia_sockets_lock); |
822 | 823 | ||
823 | kfree(sinfo); | 824 | kfree(sinfo); |
824 | 825 | ||
diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h index 6f14126889b..1edc1da9d35 100644 --- a/drivers/pcmcia/soc_common.h +++ b/drivers/pcmcia/soc_common.h | |||
@@ -133,7 +133,6 @@ extern void soc_common_pcmcia_get_timing(struct soc_pcmcia_socket *, struct soc_ | |||
133 | 133 | ||
134 | 134 | ||
135 | extern struct list_head soc_pcmcia_sockets; | 135 | extern struct list_head soc_pcmcia_sockets; |
136 | extern struct semaphore soc_pcmcia_sockets_lock; | ||
137 | 136 | ||
138 | extern int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr); | 137 | extern int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr); |
139 | extern int soc_common_drv_pcmcia_remove(struct device *dev); | 138 | extern int soc_common_drv_pcmcia_remove(struct device *dev); |