diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-02-14 14:23:33 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-02-14 14:23:33 -0500 |
commit | b90af3b8c69730fb25646c04866dfccec2f1314b (patch) | |
tree | fb4a7dd23f5d8b7803d89f1e3fb1ab075f1c06a0 /drivers/bcma | |
parent | 5171f7a0b79dfbc61a6e12f20f6eef6d7dd5b2a8 (diff) | |
parent | d786f67e5c587a4de8245336cb64cf4dd06871a7 (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.h | 5 | ||||
-rw-r--r-- | drivers/bcma/driver_chipcommon_nflash.c | 2 | ||||
-rw-r--r-- | drivers/bcma/driver_gpio.c | 5 | ||||
-rw-r--r-- | drivers/bcma/main.c | 7 |
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 */ |
99 | int bcma_gpio_init(struct bcma_drv_cc *cc); | 99 | int bcma_gpio_init(struct bcma_drv_cc *cc); |
100 | int bcma_gpio_unregister(struct bcma_drv_cc *cc); | ||
100 | #else | 101 | #else |
101 | static inline int bcma_gpio_init(struct bcma_drv_cc *cc) | 102 | static inline int bcma_gpio_init(struct bcma_drv_cc *cc) |
102 | { | 103 | { |
103 | return -ENOTSUPP; | 104 | return -ENOTSUPP; |
104 | } | 105 | } |
106 | static 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 | |||
111 | int 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) | |||
276 | void bcma_bus_unregister(struct bcma_bus *bus) | 276 | void 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); |