aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-02-14 14:23:33 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-02-14 14:23:33 -0500
commitb90af3b8c69730fb25646c04866dfccec2f1314b (patch)
treefb4a7dd23f5d8b7803d89f1e3fb1ab075f1c06a0 /drivers/bcma
parent5171f7a0b79dfbc61a6e12f20f6eef6d7dd5b2a8 (diff)
parentd786f67e5c587a4de8245336cb64cf4dd06871a7 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts: drivers/net/wireless/iwlwifi/dvm/tx.c
Diffstat (limited to 'drivers/bcma')
-rw-r--r--drivers/bcma/bcma_private.h5
-rw-r--r--drivers/bcma/driver_chipcommon_nflash.c2
-rw-r--r--drivers/bcma/driver_gpio.c5
-rw-r--r--drivers/bcma/main.c7
4 files changed, 18 insertions, 1 deletions
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h
index 16c1dddfda00..9cb929dc3397 100644
--- a/drivers/bcma/bcma_private.h
+++ b/drivers/bcma/bcma_private.h
@@ -97,11 +97,16 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc);
97#ifdef CONFIG_BCMA_DRIVER_GPIO 97#ifdef CONFIG_BCMA_DRIVER_GPIO
98/* driver_gpio.c */ 98/* driver_gpio.c */
99int bcma_gpio_init(struct bcma_drv_cc *cc); 99int bcma_gpio_init(struct bcma_drv_cc *cc);
100int bcma_gpio_unregister(struct bcma_drv_cc *cc);
100#else 101#else
101static inline int bcma_gpio_init(struct bcma_drv_cc *cc) 102static inline int bcma_gpio_init(struct bcma_drv_cc *cc)
102{ 103{
103 return -ENOTSUPP; 104 return -ENOTSUPP;
104} 105}
106static inline int bcma_gpio_unregister(struct bcma_drv_cc *cc)
107{
108 return 0;
109}
105#endif /* CONFIG_BCMA_DRIVER_GPIO */ 110#endif /* CONFIG_BCMA_DRIVER_GPIO */
106 111
107#endif 112#endif
diff --git a/drivers/bcma/driver_chipcommon_nflash.c b/drivers/bcma/driver_chipcommon_nflash.c
index 19fafcf78840..d4f699aef8c4 100644
--- a/drivers/bcma/driver_chipcommon_nflash.c
+++ b/drivers/bcma/driver_chipcommon_nflash.c
@@ -21,7 +21,7 @@ int bcma_nflash_init(struct bcma_drv_cc *cc)
21 struct bcma_bus *bus = cc->core->bus; 21 struct bcma_bus *bus = cc->core->bus;
22 22
23 if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4706 && 23 if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4706 &&
24 cc->core->id.rev != 0x38) { 24 cc->core->id.rev != 38) {
25 bcma_err(bus, "NAND flash on unsupported board!\n"); 25 bcma_err(bus, "NAND flash on unsupported board!\n");
26 return -ENOTSUPP; 26 return -ENOTSUPP;
27 } 27 }
diff --git a/drivers/bcma/driver_gpio.c b/drivers/bcma/driver_gpio.c
index 0b5df538dfd9..45f0996a3752 100644
--- a/drivers/bcma/driver_gpio.c
+++ b/drivers/bcma/driver_gpio.c
@@ -107,3 +107,8 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
107 107
108 return gpiochip_add(chip); 108 return gpiochip_add(chip);
109} 109}
110
111int bcma_gpio_unregister(struct bcma_drv_cc *cc)
112{
113 return gpiochip_remove(&cc->gpio);
114}
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 95ba5756c67e..360c41f2b509 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -276,6 +276,13 @@ int __devinit bcma_bus_register(struct bcma_bus *bus)
276void bcma_bus_unregister(struct bcma_bus *bus) 276void bcma_bus_unregister(struct bcma_bus *bus)
277{ 277{
278 struct bcma_device *cores[3]; 278 struct bcma_device *cores[3];
279 int err;
280
281 err = bcma_gpio_unregister(&bus->drv_cc);
282 if (err == -EBUSY)
283 bcma_err(bus, "Some GPIOs are still in use.\n");
284 else if (err)
285 bcma_err(bus, "Can not unregister GPIO driver: %i\n", err);
279 286
280 cores[0] = bcma_find_core(bus, BCMA_CORE_MIPS_74K); 287 cores[0] = bcma_find_core(bus, BCMA_CORE_MIPS_74K);
281 cores[1] = bcma_find_core(bus, BCMA_CORE_PCIE); 288 cores[1] = bcma_find_core(bus, BCMA_CORE_PCIE);