Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267454
b: refs/heads/master
c: 55963d7
h: refs/heads/master
v: v3
  • Loading branch information
Franky Lin authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 7b34c4d commit c7b874b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bea4f542e43433e77ab01e8ba7943bf6c1a8e3ce
refs/heads/master: 55963d748b13d0a8ceef1219e70e02da4dc9e20a
11 changes: 3 additions & 8 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ struct brcmf_sdio_card {
u32 sbwad; /* Save backplane window address */
};

/* driver info, initialized when brcmf_sdio_register is called */
static struct brcmf_sdioh_driver drvinfo = { NULL, NULL };

/* Module parameters specific to each host-controller driver */

module_param(sd_f2_blocksize, int, 0);
Expand Down Expand Up @@ -443,7 +440,7 @@ int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
vendevid = brcmf_sdcard_query_device(sdiodev->card);

/* try to attach to the target device */
sdiodev->bus = drvinfo.attach((vendevid >> 16), (vendevid & 0xFFFF),
sdiodev->bus = brcmf_sdbrcm_probe((vendevid >> 16), (vendevid & 0xFFFF),
0, 0, 0, 0, regs, sdiodev->card);
if (!sdiodev->bus) {
BRCMF_ERROR(("%s: device attach failed\n", __func__));
Expand All @@ -462,7 +459,7 @@ EXPORT_SYMBOL(brcmf_sdio_probe);
int brcmf_sdio_remove(struct brcmf_sdio_dev *sdiodev)
{
if (sdiodev->bus) {
drvinfo.detach(sdiodev->bus);
brcmf_sdbrcm_disconnect(sdiodev->bus);
sdiodev->bus = NULL;
}

Expand All @@ -477,10 +474,8 @@ int brcmf_sdio_remove(struct brcmf_sdio_dev *sdiodev)
}
EXPORT_SYMBOL(brcmf_sdio_remove);

int brcmf_sdio_register(struct brcmf_sdioh_driver *driver)
int brcmf_sdio_register(void)
{
drvinfo = *driver;

return brcmf_sdio_function_init();
}

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,8 @@ extern void brcmf_bus_clearcounts(struct brcmf_pub *drvr);

extern void brcmf_sdbrcm_wd_timer(struct brcmf_bus *bus, uint wdtick);

extern void *brcmf_sdbrcm_probe(u16 venid, u16 devid, u16 bus_no,
u16 slot, u16 func, uint bustype, u32 regsva,
void *card);
extern void brcmf_sdbrcm_disconnect(void *ptr);
#endif /* _BRCMF_BUS_H_ */
17 changes: 3 additions & 14 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,6 @@ static int brcmf_sdbrcm_download_state(struct brcmf_bus *bus, bool enter);

static void brcmf_sdbrcm_release(struct brcmf_bus *bus);
static void brcmf_sdbrcm_release_malloc(struct brcmf_bus *bus);
static void brcmf_sdbrcm_disconnect(void *ptr);
static bool brcmf_sdbrcm_chipmatch(u16 chipid);
static bool brcmf_sdbrcm_probe_attach(struct brcmf_bus *bus, void *card,
u32 regsva, u16 devid);
Expand Down Expand Up @@ -5431,7 +5430,7 @@ static bool brcmf_sdbrcm_chipmatch(u16 chipid)
return false;
}

static void *brcmf_sdbrcm_probe(u16 venid, u16 devid, u16 bus_no,
void *brcmf_sdbrcm_probe(u16 venid, u16 devid, u16 bus_no,
u16 slot, u16 func, uint bustype, u32 regsva,
void *card)
{
Expand Down Expand Up @@ -5889,7 +5888,7 @@ static void brcmf_sdbrcm_release_dongle(struct brcmf_bus *bus)
BRCMF_TRACE(("%s: Disconnected\n", __func__));
}

static void brcmf_sdbrcm_disconnect(void *ptr)
void brcmf_sdbrcm_disconnect(void *ptr)
{
struct brcmf_bus *bus = (struct brcmf_bus *)ptr;

Expand All @@ -5901,16 +5900,6 @@ static void brcmf_sdbrcm_disconnect(void *ptr)
BRCMF_TRACE(("%s: Disconnected\n", __func__));
}

/* Register/Unregister functions are called by the main DHD entry
* point (e.g. module insertion) to link with the bus driver, in
* order to look for or await the device.
*/

static struct brcmf_sdioh_driver brcmf_sdio = {
brcmf_sdbrcm_probe,
brcmf_sdbrcm_disconnect
};

int brcmf_bus_register(void)
{
BRCMF_TRACE(("%s: Enter\n", __func__));
Expand All @@ -5930,7 +5919,7 @@ int brcmf_bus_register(void)
return -EINVAL;
} while (0);

return brcmf_sdio_register(&brcmf_sdio);
return brcmf_sdio_register();
}

void brcmf_bus_unregister(void)
Expand Down
11 changes: 1 addition & 10 deletions trunk/drivers/staging/brcm80211/brcmfmac/sdio_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,20 +278,11 @@ extern int brcmf_sdcard_iovar_op(struct brcmf_sdio_card *card, const char *name,

/* helper functions */

/* callback functions */
struct brcmf_sdioh_driver {
/* attach to device */
void *(*attach) (u16 vend_id, u16 dev_id, u16 bus, u16 slot,
u16 func, uint bustype, u32 regsva, void *param);
/* detach from device */
void (*detach) (void *ch);
};

struct sdioh_info;

/* platform specific/high level functions */
extern int brcmf_sdio_function_init(void);
extern int brcmf_sdio_register(struct brcmf_sdioh_driver *driver);
extern int brcmf_sdio_register(void);
extern void brcmf_sdio_unregister(void);
extern void brcmf_sdio_function_cleanup(void);
extern int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev);
Expand Down

0 comments on commit c7b874b

Please sign in to comment.