diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-10 22:30:45 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-10 22:30:45 +0400 |
commit | 06eb4eafbdc0796d741d139a44f1253278da8611 (patch) | |
tree | fbdb44317130c371928154c9e6903e699fe2b995 /drivers/pcmcia | |
parent | 32ed53b83ea5ec26a4dba90e18f5e0ff6c71eb48 (diff) | |
parent | f68e556e23d1a4176b563bcb25d8baf2c5313f91 (diff) | |
download | linux-06eb4eafbdc0796d741d139a44f1253278da8611.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/at91_cf.c | 52 | ||||
-rw-r--r-- | drivers/pcmcia/bcm63xx_pcmcia.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/bfin_cf_pcmcia.c | 13 | ||||
-rw-r--r-- | drivers/pcmcia/cs.c | 1 | ||||
-rw-r--r-- | drivers/pcmcia/db1xxx_ss.c | 17 | ||||
-rw-r--r-- | drivers/pcmcia/electra_cf.c | 12 | ||||
-rw-r--r-- | drivers/pcmcia/i82092.c | 12 | ||||
-rw-r--r-- | drivers/pcmcia/i82365.c | 1 | ||||
-rw-r--r-- | drivers/pcmcia/m32r_cfc.c | 1 | ||||
-rw-r--r-- | drivers/pcmcia/m32r_pcc.c | 1 | ||||
-rw-r--r-- | drivers/pcmcia/m8xx_pcmcia.c | 14 | ||||
-rw-r--r-- | drivers/pcmcia/pd6729.c | 10 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_base.c | 1 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_viper.c | 13 | ||||
-rw-r--r-- | drivers/pcmcia/sa1111_generic.c | 55 | ||||
-rw-r--r-- | drivers/pcmcia/sa1111_neponset.c | 7 | ||||
-rw-r--r-- | drivers/pcmcia/sa11xx_base.c | 1 | ||||
-rw-r--r-- | drivers/pcmcia/soc_common.c | 1 | ||||
-rw-r--r-- | drivers/pcmcia/socket_sysfs.c | 1 | ||||
-rw-r--r-- | drivers/pcmcia/tcic.c | 1 | ||||
-rw-r--r-- | drivers/pcmcia/vrc4173_cardu.c | 7 | ||||
-rw-r--r-- | drivers/pcmcia/xxs1500_ss.c | 14 | ||||
-rw-r--r-- | drivers/pcmcia/yenta_socket.c | 2 |
23 files changed, 92 insertions, 147 deletions
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 1dd68f502634..9694c1e783a5 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c @@ -16,13 +16,13 @@ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/slab.h> +#include <linux/gpio.h> #include <pcmcia/ss.h> #include <mach/hardware.h> #include <asm/io.h> #include <asm/sizes.h> -#include <asm/gpio.h> #include <mach/board.h> #include <mach/at91rm9200_mc.h> @@ -70,7 +70,7 @@ static irqreturn_t at91_cf_irq(int irq, void *_cf) { struct at91_cf_socket *cf = _cf; - if (irq == cf->board->det_pin) { + if (irq == gpio_to_irq(cf->board->det_pin)) { unsigned present = at91_cf_present(cf); /* kick pccard as needed */ @@ -96,8 +96,8 @@ static int at91_cf_get_status(struct pcmcia_socket *s, u_int *sp) /* NOTE: CF is always 3VCARD */ if (at91_cf_present(cf)) { - int rdy = cf->board->irq_pin; /* RDY/nIRQ */ - int vcc = cf->board->vcc_pin; + int rdy = gpio_is_valid(cf->board->irq_pin); /* RDY/nIRQ */ + int vcc = gpio_is_valid(cf->board->vcc_pin); *sp = SS_DETECT | SS_3VCARD; if (!rdy || gpio_get_value(rdy)) @@ -118,7 +118,7 @@ at91_cf_set_socket(struct pcmcia_socket *sock, struct socket_state_t *s) cf = container_of(sock, struct at91_cf_socket, socket); /* switch Vcc if needed and possible */ - if (cf->board->vcc_pin) { + if (gpio_is_valid(cf->board->vcc_pin)) { switch (s->Vcc) { case 0: gpio_set_value(cf->board->vcc_pin, 0); @@ -222,7 +222,7 @@ static int __init at91_cf_probe(struct platform_device *pdev) struct resource *io; int status; - if (!board || !board->det_pin || !board->rst_pin) + if (!board || !gpio_is_valid(board->det_pin) || !gpio_is_valid(board->rst_pin)) return -ENODEV; io = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -242,7 +242,7 @@ static int __init at91_cf_probe(struct platform_device *pdev) status = gpio_request(board->det_pin, "cf_det"); if (status < 0) goto fail0; - status = request_irq(board->det_pin, at91_cf_irq, 0, driver_name, cf); + status = request_irq(gpio_to_irq(board->det_pin), at91_cf_irq, 0, driver_name, cf); if (status < 0) goto fail00; device_init_wakeup(&pdev->dev, 1); @@ -251,7 +251,7 @@ static int __init at91_cf_probe(struct platform_device *pdev) if (status < 0) goto fail0a; - if (board->vcc_pin) { + if (gpio_is_valid(board->vcc_pin)) { status = gpio_request(board->vcc_pin, "cf_vcc"); if (status < 0) goto fail0b; @@ -263,15 +263,15 @@ static int __init at91_cf_probe(struct platform_device *pdev) * unless we report that we handle everything (sigh). * (Note: DK board doesn't wire the IRQ pin...) */ - if (board->irq_pin) { + if (gpio_is_valid(board->irq_pin)) { status = gpio_request(board->irq_pin, "cf_irq"); if (status < 0) goto fail0c; - status = request_irq(board->irq_pin, at91_cf_irq, + status = request_irq(gpio_to_irq(board->irq_pin), at91_cf_irq, IRQF_SHARED, driver_name, cf); if (status < 0) goto fail0d; - cf->socket.pci_irq = board->irq_pin; + cf->socket.pci_irq = gpio_to_irq(board->irq_pin); } else cf->socket.pci_irq = nr_irqs + 1; @@ -290,7 +290,7 @@ static int __init at91_cf_probe(struct platform_device *pdev) } pr_info("%s: irqs det #%d, io #%d\n", driver_name, - board->det_pin, board->irq_pin); + gpio_to_irq(board->det_pin), gpio_to_irq(board->irq_pin)); cf->socket.owner = THIS_MODULE; cf->socket.dev.parent = &pdev->dev; @@ -312,19 +312,19 @@ fail2: fail1: if (cf->socket.io_offset) iounmap((void __iomem *) cf->socket.io_offset); - if (board->irq_pin) { - free_irq(board->irq_pin, cf); + if (gpio_is_valid(board->irq_pin)) { + free_irq(gpio_to_irq(board->irq_pin), cf); fail0d: gpio_free(board->irq_pin); } fail0c: - if (board->vcc_pin) + if (gpio_is_valid(board->vcc_pin)) gpio_free(board->vcc_pin); fail0b: gpio_free(board->rst_pin); fail0a: device_init_wakeup(&pdev->dev, 0); - free_irq(board->det_pin, cf); + free_irq(gpio_to_irq(board->det_pin), cf); fail00: gpio_free(board->det_pin); fail0: @@ -341,15 +341,15 @@ static int __exit at91_cf_remove(struct platform_device *pdev) pcmcia_unregister_socket(&cf->socket); release_mem_region(io->start, resource_size(io)); iounmap((void __iomem *) cf->socket.io_offset); - if (board->irq_pin) { - free_irq(board->irq_pin, cf); + if (gpio_is_valid(board->irq_pin)) { + free_irq(gpio_to_irq(board->irq_pin), cf); gpio_free(board->irq_pin); } - if (board->vcc_pin) + if (gpio_is_valid(board->vcc_pin)) gpio_free(board->vcc_pin); gpio_free(board->rst_pin); device_init_wakeup(&pdev->dev, 0); - free_irq(board->det_pin, cf); + free_irq(gpio_to_irq(board->det_pin), cf); gpio_free(board->det_pin); kfree(cf); return 0; @@ -363,9 +363,9 @@ static int at91_cf_suspend(struct platform_device *pdev, pm_message_t mesg) struct at91_cf_data *board = cf->board; if (device_may_wakeup(&pdev->dev)) { - enable_irq_wake(board->det_pin); - if (board->irq_pin) - enable_irq_wake(board->irq_pin); + enable_irq_wake(gpio_to_irq(board->det_pin)); + if (gpio_is_valid(board->irq_pin)) + enable_irq_wake(gpio_to_irq(board->irq_pin)); } return 0; } @@ -376,9 +376,9 @@ static int at91_cf_resume(struct platform_device *pdev) struct at91_cf_data *board = cf->board; if (device_may_wakeup(&pdev->dev)) { - disable_irq_wake(board->det_pin); - if (board->irq_pin) - disable_irq_wake(board->irq_pin); + disable_irq_wake(gpio_to_irq(board->det_pin)); + if (gpio_is_valid(board->irq_pin)) + disable_irq_wake(gpio_to_irq(board->irq_pin)); } return 0; diff --git a/drivers/pcmcia/bcm63xx_pcmcia.c b/drivers/pcmcia/bcm63xx_pcmcia.c index 693577e0fefc..c2e997a570bf 100644 --- a/drivers/pcmcia/bcm63xx_pcmcia.c +++ b/drivers/pcmcia/bcm63xx_pcmcia.c @@ -475,7 +475,7 @@ static void __devexit bcm63xx_cb_exit(struct pci_dev *dev) bcm63xx_cb_dev = NULL; } -static struct pci_device_id bcm63xx_cb_table[] = { +static DEFINE_PCI_DEVICE_TABLE(bcm63xx_cb_table) = { { .vendor = PCI_VENDOR_ID_BROADCOM, .device = BCM6348_CPU_ID, diff --git a/drivers/pcmcia/bfin_cf_pcmcia.c b/drivers/pcmcia/bfin_cf_pcmcia.c index 49221395101e..ac1a2232eab9 100644 --- a/drivers/pcmcia/bfin_cf_pcmcia.c +++ b/drivers/pcmcia/bfin_cf_pcmcia.c @@ -310,18 +310,7 @@ static struct platform_driver bfin_cf_driver = { .remove = __devexit_p(bfin_cf_remove), }; -static int __init bfin_cf_init(void) -{ - return platform_driver_register(&bfin_cf_driver); -} - -static void __exit bfin_cf_exit(void) -{ - platform_driver_unregister(&bfin_cf_driver); -} - -module_init(bfin_cf_init); -module_exit(bfin_cf_exit); +module_platform_driver(bfin_cf_driver); MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); MODULE_DESCRIPTION("BFIN CF/PCMCIA Driver"); diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index d9ea192c4001..673c14ea11e3 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c @@ -29,7 +29,6 @@ #include <linux/device.h> #include <linux/kthread.h> #include <linux/freezer.h> -#include <asm/system.h> #include <asm/irq.h> #include <pcmcia/ss.h> diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c index 5b7c22784aff..a484b1fb3382 100644 --- a/drivers/pcmcia/db1xxx_ss.c +++ b/drivers/pcmcia/db1xxx_ss.c @@ -172,12 +172,12 @@ static int db1x_pcmcia_setup_irqs(struct db1x_pcmcia_sock *sock) if ((sock->board_type == BOARD_TYPE_DB1200) || (sock->board_type == BOARD_TYPE_DB1300)) { ret = request_irq(sock->insert_irq, db1200_pcmcia_cdirq, - IRQF_DISABLED, "pcmcia_insert", sock); + 0, "pcmcia_insert", sock); if (ret) goto out1; ret = request_irq(sock->eject_irq, db1200_pcmcia_cdirq, - IRQF_DISABLED, "pcmcia_eject", sock); + 0, "pcmcia_eject", sock); if (ret) { free_irq(sock->insert_irq, sock); goto out1; @@ -580,18 +580,7 @@ static struct platform_driver db1x_pcmcia_socket_driver = { .remove = __devexit_p(db1x_pcmcia_socket_remove), }; -int __init db1x_pcmcia_socket_load(void) -{ - return platform_driver_register(&db1x_pcmcia_socket_driver); -} - -void __exit db1x_pcmcia_socket_unload(void) -{ - platform_driver_unregister(&db1x_pcmcia_socket_driver); -} - -module_init(db1x_pcmcia_socket_load); -module_exit(db1x_pcmcia_socket_unload); +module_platform_driver(db1x_pcmcia_socket_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("PCMCIA Socket Services for Alchemy Db/Pb1x00 boards"); diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c index 06ad3e5e7d3d..7647d232e9e2 100644 --- a/drivers/pcmcia/electra_cf.c +++ b/drivers/pcmcia/electra_cf.c @@ -365,17 +365,7 @@ static struct platform_driver electra_cf_driver = { .remove = electra_cf_remove, }; -static int __init electra_cf_init(void) -{ - return platform_driver_register(&electra_cf_driver); -} -module_init(electra_cf_init); - -static void __exit electra_cf_exit(void) -{ - platform_driver_unregister(&electra_cf_driver); -} -module_exit(electra_cf_exit); +module_platform_driver(electra_cf_driver); MODULE_LICENSE("GPL"); MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>"); diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c index 3e447d0387b7..4e8831bdb6ef 100644 --- a/drivers/pcmcia/i82092.c +++ b/drivers/pcmcia/i82092.c @@ -17,7 +17,6 @@ #include <pcmcia/ss.h> -#include <asm/system.h> #include <asm/io.h> #include "i82092aa.h" @@ -26,14 +25,9 @@ MODULE_LICENSE("GPL"); /* PCI core routines */ -static struct pci_device_id i82092aa_pci_ids[] = { - { - .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_INTEL_82092AA_0, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - }, - {} +static DEFINE_PCI_DEVICE_TABLE(i82092aa_pci_ids) = { + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82092AA_0) }, + { } }; MODULE_DEVICE_TABLE(pci, i82092aa_pci_ids); diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c index 72a033a2acdb..e6f3d17dd2b4 100644 --- a/drivers/pcmcia/i82365.c +++ b/drivers/pcmcia/i82365.c @@ -48,7 +48,6 @@ #include <linux/bitops.h> #include <asm/irq.h> #include <asm/io.h> -#include <asm/system.h> #include <pcmcia/ss.h> diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c index 2adb0106a039..a26f38c6402a 100644 --- a/drivers/pcmcia/m32r_cfc.c +++ b/drivers/pcmcia/m32r_cfc.c @@ -24,7 +24,6 @@ #include <linux/bitops.h> #include <asm/irq.h> #include <asm/io.h> -#include <asm/system.h> #include <pcmcia/ss.h> diff --git a/drivers/pcmcia/m32r_pcc.c b/drivers/pcmcia/m32r_pcc.c index 1511ff71c87b..296514155cd5 100644 --- a/drivers/pcmcia/m32r_pcc.c +++ b/drivers/pcmcia/m32r_pcc.c @@ -24,7 +24,6 @@ #include <linux/bitops.h> #include <asm/irq.h> #include <asm/io.h> -#include <asm/system.h> #include <asm/addrspace.h> #include <pcmcia/ss.h> diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c index 271a590a5f3c..a3a851e49321 100644 --- a/drivers/pcmcia/m8xx_pcmcia.c +++ b/drivers/pcmcia/m8xx_pcmcia.c @@ -52,7 +52,6 @@ #include <linux/of_platform.h> #include <asm/io.h> -#include <asm/system.h> #include <asm/time.h> #include <asm/mpc8xx.h> #include <asm/8xx_immap.h> @@ -1304,15 +1303,4 @@ static struct platform_driver m8xx_pcmcia_driver = { .remove = m8xx_remove, }; -static int __init m8xx_init(void) -{ - return platform_driver_register(&m8xx_pcmcia_driver); -} - -static void __exit m8xx_exit(void) -{ - platform_driver_unregister(&m8xx_pcmcia_driver); -} - -module_init(m8xx_init); -module_exit(m8xx_exit); +module_platform_driver(m8xx_pcmcia_driver); diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c index 96c72e90b79c..253e3867dec7 100644 --- a/drivers/pcmcia/pd6729.c +++ b/drivers/pcmcia/pd6729.c @@ -19,7 +19,6 @@ #include <pcmcia/ss.h> -#include <asm/system.h> #include "pd6729.h" #include "i82365.h" @@ -763,13 +762,8 @@ static void __devexit pd6729_pci_remove(struct pci_dev *dev) kfree(socket); } -static struct pci_device_id pd6729_pci_ids[] = { - { - .vendor = PCI_VENDOR_ID_CIRRUS, - .device = PCI_DEVICE_ID_CIRRUS_6729, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - }, +static DEFINE_PCI_DEVICE_TABLE(pd6729_pci_ids) = { + { PCI_DEVICE(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_6729) }, { } }; MODULE_DEVICE_TABLE(pci, pd6729_pci_ids); diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index 66a54222bbf4..490bb82b5bdb 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c @@ -29,7 +29,6 @@ #include <mach/smemc.h> #include <asm/io.h> #include <asm/irq.h> -#include <asm/system.h> #include <mach/pxa2xx-regs.h> #include <asm/mach-types.h> diff --git a/drivers/pcmcia/pxa2xx_viper.c b/drivers/pcmcia/pxa2xx_viper.c index adfae4987a42..cb0c37ec7f24 100644 --- a/drivers/pcmcia/pxa2xx_viper.c +++ b/drivers/pcmcia/pxa2xx_viper.c @@ -177,18 +177,7 @@ static struct platform_driver viper_pcmcia_driver = { .id_table = viper_pcmcia_id_table, }; -static int __init viper_pcmcia_init(void) -{ - return platform_driver_register(&viper_pcmcia_driver); -} - -static void __exit viper_pcmcia_exit(void) -{ - return platform_driver_unregister(&viper_pcmcia_driver); -} - -module_init(viper_pcmcia_init); -module_exit(viper_pcmcia_exit); +module_platform_driver(viper_pcmcia_driver); MODULE_DEVICE_TABLE(platform, viper_pcmcia_id_table); MODULE_LICENSE("GPL"); diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c index ef5848f65241..70f728ce1856 100644 --- a/drivers/pcmcia/sa1111_generic.c +++ b/drivers/pcmcia/sa1111_generic.c @@ -22,6 +22,40 @@ #include "sa1111_generic.h" +/* + * These are offsets from the above base. + */ +#define PCCR 0x0000 +#define PCSSR 0x0004 +#define PCSR 0x0008 + +#define PCSR_S0_READY (1<<0) +#define PCSR_S1_READY (1<<1) +#define PCSR_S0_DETECT (1<<2) +#define PCSR_S1_DETECT (1<<3) +#define PCSR_S0_VS1 (1<<4) +#define PCSR_S0_VS2 (1<<5) +#define PCSR_S1_VS1 (1<<6) +#define PCSR_S1_VS2 (1<<7) +#define PCSR_S0_WP (1<<8) +#define PCSR_S1_WP (1<<9) +#define PCSR_S0_BVD1 (1<<10) +#define PCSR_S0_BVD2 (1<<11) +#define PCSR_S1_BVD1 (1<<12) +#define PCSR_S1_BVD2 (1<<13) + +#define PCCR_S0_RST (1<<0) +#define PCCR_S1_RST (1<<1) +#define PCCR_S0_FLT (1<<2) +#define PCCR_S1_FLT (1<<3) +#define PCCR_S0_PWAITEN (1<<4) +#define PCCR_S1_PWAITEN (1<<5) +#define PCCR_S0_PSE (1<<6) +#define PCCR_S1_PSE (1<<7) + +#define PCSSR_S0_SLEEP (1<<0) +#define PCSSR_S1_SLEEP (1<<1) + #define IDX_IRQ_S0_READY_NINT (0) #define IDX_IRQ_S0_CD_VALID (1) #define IDX_IRQ_S0_BVD1_STSCHG (2) @@ -32,7 +66,7 @@ void sa1111_pcmcia_socket_state(struct soc_pcmcia_socket *skt, struct pcmcia_state *state) { struct sa1111_pcmcia_socket *s = to_skt(skt); - unsigned long status = sa1111_readl(s->dev->mapbase + SA1111_PCSR); + unsigned long status = sa1111_readl(s->dev->mapbase + PCSR); switch (skt->nr) { case 0: @@ -88,10 +122,10 @@ int sa1111_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_s pccr_set_mask |= PCCR_S0_FLT|PCCR_S1_FLT; local_irq_save(flags); - val = sa1111_readl(s->dev->mapbase + SA1111_PCCR); + val = sa1111_readl(s->dev->mapbase + PCCR); val &= ~pccr_skt_mask; val |= pccr_set_mask & pccr_skt_mask; - sa1111_writel(val, s->dev->mapbase + SA1111_PCCR); + sa1111_writel(val, s->dev->mapbase + PCCR); local_irq_restore(flags); return 0; @@ -141,20 +175,26 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops, static int pcmcia_probe(struct sa1111_dev *dev) { void __iomem *base; + int ret; + + ret = sa1111_enable_device(dev); + if (ret) + return ret; dev_set_drvdata(&dev->dev, NULL); - if (!request_mem_region(dev->res.start, 512, - SA1111_DRIVER_NAME(dev))) + if (!request_mem_region(dev->res.start, 512, SA1111_DRIVER_NAME(dev))) { + sa1111_disable_device(dev); return -EBUSY; + } base = dev->mapbase; /* * Initialise the suspend state. */ - sa1111_writel(PCSSR_S0_SLEEP | PCSSR_S1_SLEEP, base + SA1111_PCSSR); - sa1111_writel(PCCR_S0_FLT | PCCR_S1_FLT, base + SA1111_PCCR); + sa1111_writel(PCSSR_S0_SLEEP | PCSSR_S1_SLEEP, base + PCSSR); + sa1111_writel(PCCR_S0_FLT | PCCR_S1_FLT, base + PCCR); #ifdef CONFIG_SA1100_BADGE4 pcmcia_badge4_init(&dev->dev); @@ -184,6 +224,7 @@ static int __devexit pcmcia_remove(struct sa1111_dev *dev) } release_mem_region(dev->res.start, 512); + sa1111_disable_device(dev); return 0; } diff --git a/drivers/pcmcia/sa1111_neponset.c b/drivers/pcmcia/sa1111_neponset.c index 50f297d850e7..1d78739c4c07 100644 --- a/drivers/pcmcia/sa1111_neponset.c +++ b/drivers/pcmcia/sa1111_neponset.c @@ -94,12 +94,7 @@ neponset_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_sta ret = sa1111_pcmcia_configure_socket(skt, state); if (ret == 0) { - unsigned long flags; - - local_irq_save(flags); - NCR_0 = (NCR_0 & ~ncr_mask) | ncr_set; - - local_irq_restore(flags); + neponset_ncr_frob(ncr_mask, ncr_set); sa1111_set_io(s->dev, pa_dwr_mask, pa_dwr_set); } diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c index a3ee89a6dd0e..6eecd7cddf57 100644 --- a/drivers/pcmcia/sa11xx_base.c +++ b/drivers/pcmcia/sa11xx_base.c @@ -41,7 +41,6 @@ #include <mach/hardware.h> #include <asm/irq.h> -#include <asm/system.h> #include "soc_common.h" #include "sa11xx_base.h" diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index e0433f571962..a2bc6ee1702e 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c @@ -46,7 +46,6 @@ #include <linux/timer.h> #include <mach/hardware.h> -#include <asm/system.h> #include "soc_common.h" diff --git a/drivers/pcmcia/socket_sysfs.c b/drivers/pcmcia/socket_sysfs.c index 71aeed93037c..d6881514d38e 100644 --- a/drivers/pcmcia/socket_sysfs.c +++ b/drivers/pcmcia/socket_sysfs.c @@ -23,7 +23,6 @@ #include <linux/pm.h> #include <linux/device.h> #include <linux/mutex.h> -#include <asm/system.h> #include <asm/irq.h> #include <pcmcia/ss.h> diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c index 310160bffe38..cbe15fc37411 100644 --- a/drivers/pcmcia/tcic.c +++ b/drivers/pcmcia/tcic.c @@ -47,7 +47,6 @@ #include <linux/bitops.h> #include <asm/io.h> -#include <asm/system.h> #include <pcmcia/ss.h> #include "tcic.h" diff --git a/drivers/pcmcia/vrc4173_cardu.c b/drivers/pcmcia/vrc4173_cardu.c index c6d36b3a6ce8..cd0a315d922b 100644 --- a/drivers/pcmcia/vrc4173_cardu.c +++ b/drivers/pcmcia/vrc4173_cardu.c @@ -563,11 +563,8 @@ static int __devinit vrc4173_cardu_setup(char *options) __setup("vrc4173_cardu=", vrc4173_cardu_setup); -static struct pci_device_id vrc4173_cardu_id_table[] __devinitdata = { - { .vendor = PCI_VENDOR_ID_NEC, - .device = PCI_DEVICE_ID_NEC_NAPCCARD, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, }, +static DEFINE_PCI_DEVICE_TABLE(vrc4173_cardu_id_table) = { + { PCI_DEVICE(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NAPCCARD) }, {0, } }; diff --git a/drivers/pcmcia/xxs1500_ss.c b/drivers/pcmcia/xxs1500_ss.c index 379f4218857d..fd5fbd10aad0 100644 --- a/drivers/pcmcia/xxs1500_ss.c +++ b/drivers/pcmcia/xxs1500_ss.c @@ -21,7 +21,6 @@ #include <pcmcia/cistpl.h> #include <asm/irq.h> -#include <asm/system.h> #include <asm/mach-au1x00/au1000.h> #define MEM_MAP_SIZE 0x400000 @@ -321,18 +320,7 @@ static struct platform_driver xxs1500_pcmcia_socket_driver = { .remove = __devexit_p(xxs1500_pcmcia_remove), }; -int __init xxs1500_pcmcia_socket_load(void) -{ - return platform_driver_register(&xxs1500_pcmcia_socket_driver); -} - -void __exit xxs1500_pcmcia_socket_unload(void) -{ - platform_driver_unregister(&xxs1500_pcmcia_socket_driver); -} - -module_init(xxs1500_pcmcia_socket_load); -module_exit(xxs1500_pcmcia_socket_unload); +module_platform_driver(xxs1500_pcmcia_socket_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("PCMCIA Socket Services for MyCable XXS1500 systems"); diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 849c0c11d2af..d07f9ac8c41d 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c @@ -1352,7 +1352,7 @@ static const struct dev_pm_ops yenta_pm_ops = { .driver_data = CARDBUS_TYPE_##type, \ } -static struct pci_device_id yenta_table[] = { +static DEFINE_PCI_DEVICE_TABLE(yenta_table) = { CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1031, TI), /* |