diff options
author | Arend van Spriel <arend@broadcom.com> | 2011-02-25 15:39:24 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-01 02:20:35 (GMT) |
commit | 06d278c51a072a655d7da23e3acc53f676967375 (patch) | |
tree | 58a06f243cabb7d50f6f399ee7a27da8fec3d6b6 /drivers/staging/brcm80211/include/osl.h | |
parent | 7c0e45d7fb4ca3f9505b316598f4c2d748f3e8d0 (diff) | |
download | linux-06d278c51a072a655d7da23e3acc53f676967375.tar.xz |
staging: brcm80211: remove usage of struct osl_info to access device
For accessing the PCI or SDIO device in the driver the device is stored
in a separate structure osl_info. To get rid of the osl concept the use
of this device pointer attribute is removed from the drivers.
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/include/osl.h')
-rw-r--r-- | drivers/staging/brcm80211/include/osl.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/staging/brcm80211/include/osl.h b/drivers/staging/brcm80211/include/osl.h index f118b305..0aac64a 100644 --- a/drivers/staging/brcm80211/include/osl.h +++ b/drivers/staging/brcm80211/include/osl.h @@ -66,14 +66,11 @@ extern uint osl_pci_slot(struct osl_info *osh); #endif #if defined(BCMSDIO) -#define SELECT_BUS_WRITE(osh, mmap_op, bus_op) \ - if ((osh)->mmbus) \ - mmap_op else bus_op -#define SELECT_BUS_READ(osh, mmap_op, bus_op) \ - ((osh)->mmbus) ? mmap_op : bus_op +#define SELECT_BUS_WRITE(mmap_op, bus_op) bus_op +#define SELECT_BUS_READ(mmap_op, bus_op) bus_op #else -#define SELECT_BUS_WRITE(osh, mmap_op, bus_op) mmap_op -#define SELECT_BUS_READ(osh, mmap_op, bus_op) mmap_op +#define SELECT_BUS_WRITE(mmap_op, bus_op) mmap_op +#define SELECT_BUS_READ(mmap_op, bus_op) mmap_op #endif /* the largest reasonable packet buffer driver uses for ethernet MTU in bytes */ @@ -89,14 +86,14 @@ extern uint osl_pci_slot(struct osl_info *osh); #ifndef IL_BIGENDIAN #ifndef __mips__ #define R_REG(osh, r) (\ - SELECT_BUS_READ(osh, sizeof(*(r)) == sizeof(u8) ? \ + SELECT_BUS_READ(sizeof(*(r)) == sizeof(u8) ? \ readb((volatile u8*)(r)) : \ sizeof(*(r)) == sizeof(u16) ? readw((volatile u16*)(r)) : \ readl((volatile u32*)(r)), OSL_READ_REG(osh, r)) \ ) #else /* __mips__ */ #define R_REG(osh, r) (\ - SELECT_BUS_READ(osh, \ + SELECT_BUS_READ( \ ({ \ __typeof(*(r)) __osl_v; \ __asm__ __volatile__("sync"); \ @@ -126,7 +123,7 @@ extern uint osl_pci_slot(struct osl_info *osh); #endif /* __mips__ */ #define W_REG(osh, r, v) do { \ - SELECT_BUS_WRITE(osh, \ + SELECT_BUS_WRITE( \ switch (sizeof(*(r))) { \ case sizeof(u8): \ writeb((u8)(v), (volatile u8*)(r)); break; \ @@ -139,7 +136,7 @@ extern uint osl_pci_slot(struct osl_info *osh); } while (0) #else /* IL_BIGENDIAN */ #define R_REG(osh, r) (\ - SELECT_BUS_READ(osh, \ + SELECT_BUS_READ( \ ({ \ __typeof(*(r)) __osl_v; \ switch (sizeof(*(r))) { \ @@ -160,7 +157,7 @@ extern uint osl_pci_slot(struct osl_info *osh); OSL_READ_REG(osh, r)) \ ) #define W_REG(osh, r, v) do { \ - SELECT_BUS_WRITE(osh, \ + SELECT_BUS_WRITE( \ switch (sizeof(*(r))) { \ case sizeof(u8): \ writeb((u8)(v), \ |