b43: use bcma_chipco_gpio_control()
authorHauke Mehrtens <hauke@hauke-m.de>
Thu, 21 Mar 2013 15:19:45 +0000 (16:19 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 25 Mar 2013 20:43:41 +0000 (16:43 -0400)
With this patch the same registers are written, but this access is now
protected by a lock.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/b43/main.c

index c4d0cc582555f0a86e9e925d5e11ecf266c63370..ae4eeb3bfa549262c00d8af5e9401339f07ba991 100644 (file)
@@ -2780,9 +2780,7 @@ static int b43_gpio_init(struct b43_wldev *dev)
        switch (dev->dev->bus_type) {
 #ifdef CONFIG_B43_BCMA
        case B43_BUS_BCMA:
-               bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL,
-                               (bcma_cc_read32(&dev->dev->bdev->bus->drv_cc,
-                                       BCMA_CC_GPIOCTL) & ~mask) | set);
+               bcma_chipco_gpio_control(&dev->dev->bdev->bus->drv_cc, mask, set);
                break;
 #endif
 #ifdef CONFIG_B43_SSB
@@ -2807,8 +2805,7 @@ static void b43_gpio_cleanup(struct b43_wldev *dev)
        switch (dev->dev->bus_type) {
 #ifdef CONFIG_B43_BCMA
        case B43_BUS_BCMA:
-               bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL,
-                               0);
+               bcma_chipco_gpio_control(&dev->dev->bdev->bus->drv_cc, ~0, 0);
                break;
 #endif
 #ifdef CONFIG_B43_SSB