Commit 89650047 authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: replaced typedef by struct for several sdio types

Code cleanup.
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Reviewed-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 677226aa
...@@ -49,10 +49,8 @@ extern void brcmf_sdbrcm_isr(void *args); ...@@ -49,10 +49,8 @@ extern void brcmf_sdbrcm_isr(void *args);
/** /**
* SDIO Host Controller info * SDIO Host Controller info
*/ */
typedef struct bcmsdh_hc bcmsdh_hc_t;
struct bcmsdh_hc { struct bcmsdh_hc {
bcmsdh_hc_t *next; struct bcmsdh_hc *next;
#ifdef BCMPLATFORM_BUS #ifdef BCMPLATFORM_BUS
struct device *dev; /* platform device handle */ struct device *dev; /* platform device handle */
#else #else
...@@ -69,10 +67,10 @@ struct bcmsdh_hc { ...@@ -69,10 +67,10 @@ struct bcmsdh_hc {
spinlock_t irq_lock; spinlock_t irq_lock;
#endif #endif
}; };
static bcmsdh_hc_t *sdhcinfo; static struct bcmsdh_hc *sdhcinfo;
/* driver info, initialized when brcmf_sdio_register is called */ /* driver info, initialized when brcmf_sdio_register is called */
static bcmsdh_driver_t drvinfo = { NULL, NULL }; static struct brcmf_sdioh_driver drvinfo = { NULL, NULL };
/* debugging macros */ /* debugging macros */
#define SDLX_MSG(x) #define SDLX_MSG(x)
...@@ -142,7 +140,7 @@ static ...@@ -142,7 +140,7 @@ static
#endif /* BCMLXSDMMC */ #endif /* BCMLXSDMMC */
int brcmf_sdio_probe(struct device *dev) int brcmf_sdio_probe(struct device *dev)
{ {
bcmsdh_hc_t *sdhc = NULL; struct bcmsdh_hc *sdhc = NULL;
unsigned long regs = 0; unsigned long regs = 0;
struct brcmf_sdio *sdh = NULL; struct brcmf_sdio *sdh = NULL;
#if !defined(BCMLXSDMMC) && defined(BCMPLATFORM_BUS) #if !defined(BCMLXSDMMC) && defined(BCMPLATFORM_BUS)
...@@ -176,7 +174,7 @@ int brcmf_sdio_probe(struct device *dev) ...@@ -176,7 +174,7 @@ int brcmf_sdio_probe(struct device *dev)
} }
#endif /* defined(OOB_INTR_ONLY) */ #endif /* defined(OOB_INTR_ONLY) */
/* allocate SDIO Host Controller state info */ /* allocate SDIO Host Controller state info */
sdhc = kzalloc(sizeof(bcmsdh_hc_t), GFP_ATOMIC); sdhc = kzalloc(sizeof(struct bcmsdh_hc), GFP_ATOMIC);
if (!sdhc) { if (!sdhc) {
SDLX_MSG(("%s: out of memory\n", __func__)); SDLX_MSG(("%s: out of memory\n", __func__));
goto err; goto err;
...@@ -236,7 +234,7 @@ static ...@@ -236,7 +234,7 @@ static
#endif /* BCMLXSDMMC */ #endif /* BCMLXSDMMC */
int brcmf_sdio_remove(struct device *dev) int brcmf_sdio_remove(struct device *dev)
{ {
bcmsdh_hc_t *sdhc, *prev; struct bcmsdh_hc *sdhc, *prev;
sdhc = sdhcinfo; sdhc = sdhcinfo;
drvinfo.detach(sdhc->ch); drvinfo.detach(sdhc->ch);
...@@ -271,7 +269,7 @@ int brcmf_sdio_remove(struct device *dev) ...@@ -271,7 +269,7 @@ int brcmf_sdio_remove(struct device *dev)
extern int brcmf_sdio_function_init(void); extern int brcmf_sdio_function_init(void);
int brcmf_sdio_register(bcmsdh_driver_t *driver) int brcmf_sdio_register(struct brcmf_sdioh_driver *driver)
{ {
drvinfo = *driver; drvinfo = *driver;
......
...@@ -5632,7 +5632,7 @@ static void brcmf_sdbrcm_disconnect(void *ptr) ...@@ -5632,7 +5632,7 @@ static void brcmf_sdbrcm_disconnect(void *ptr)
* order to look for or await the device. * order to look for or await the device.
*/ */
static bcmsdh_driver_t dhd_sdio = { static struct brcmf_sdioh_driver dhd_sdio = {
brcmf_sdbrcm_probe, brcmf_sdbrcm_probe,
brcmf_sdbrcm_disconnect brcmf_sdbrcm_disconnect
}; };
......
...@@ -201,16 +201,16 @@ extern int brcmf_sdcard_reset(struct brcmf_sdio *sdh); ...@@ -201,16 +201,16 @@ extern int brcmf_sdcard_reset(struct brcmf_sdio *sdh);
extern void *brcmf_sdcard_get_sdioh(struct brcmf_sdio *sdh); extern void *brcmf_sdcard_get_sdioh(struct brcmf_sdio *sdh);
/* callback functions */ /* callback functions */
typedef struct { struct brcmf_sdioh_driver {
/* attach to device */ /* attach to device */
void *(*attach) (u16 vend_id, u16 dev_id, u16 bus, u16 slot, void *(*attach) (u16 vend_id, u16 dev_id, u16 bus, u16 slot,
u16 func, uint bustype, void *regsva, void *param); u16 func, uint bustype, void *regsva, void *param);
/* detach from device */ /* detach from device */
void (*detach) (void *ch); void (*detach) (void *ch);
} bcmsdh_driver_t; };
/* platform specific/high level functions */ /* platform specific/high level functions */
extern int brcmf_sdio_register(bcmsdh_driver_t *driver); extern int brcmf_sdio_register(struct brcmf_sdioh_driver *driver);
extern void brcmf_sdio_unregister(void); extern void brcmf_sdio_unregister(void);
extern bool brcmf_sdio_chipmatch(u16 vendor, u16 device); extern bool brcmf_sdio_chipmatch(u16 vendor, u16 device);
extern void brcmf_sdio_device_remove(void *sdh); extern void brcmf_sdio_device_remove(void *sdh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment