Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c9d4c37 authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman
Browse files

staging: brcm80211: remove struct osl_info from driver sources



The struct osl_info was being used only in attach functions but
previous changes make the entire usage of this structure obsolete.

Reviewed-by: default avatarBrett Rudley <brudley@broadcom.com>
Reviewed-by: default avatarHenry Ptasinski <henryp@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 537ebbbe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ typedef void (*sdioh_cb_fn_t) (void *);
 *  The handler shall be provided by all subsequent calls. No local cache
 *  cfghdl points to the starting address of pci device mapped memory
 */
extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *cfghdl, uint irq);
extern sdioh_info_t *sdioh_attach(void *cfghdl, uint irq);
extern SDIOH_API_RC sdioh_detach(sdioh_info_t *si);
extern SDIOH_API_RC sdioh_interrupt_register(sdioh_info_t *si,
					     sdioh_cb_fn_t fn, void *argh);
+2 −5
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ struct bcmsdh_info {
	bool init_success;	/* underlying driver successfully attached */
	void *sdioh;		/* handler for sdioh */
	u32 vendevid;	/* Target Vendor and Device ID on SD bus */
	struct osl_info *osh;
	bool regfail;		/* Save status of last
				 reg_read/reg_write call */
	u32 sbwad;		/* Save backplane window address */
@@ -55,8 +54,7 @@ void bcmsdh_enable_hw_oob_intr(bcmsdh_info_t *sdh, bool enable)
}
#endif

bcmsdh_info_t *bcmsdh_attach(struct osl_info *osh, void *cfghdl,
				void **regsva, uint irq)
bcmsdh_info_t *bcmsdh_attach(void *cfghdl, void **regsva, uint irq)
{
	bcmsdh_info_t *bcmsdh;

@@ -69,13 +67,12 @@ bcmsdh_info_t *bcmsdh_attach(struct osl_info *osh, void *cfghdl,
	/* save the handler locally */
	l_bcmsdh = bcmsdh;

	bcmsdh->sdioh = sdioh_attach(osh, cfghdl, irq);
	bcmsdh->sdioh = sdioh_attach(cfghdl, irq);
	if (!bcmsdh->sdioh) {
		bcmsdh_detach(bcmsdh);
		return NULL;
	}

	bcmsdh->osh = osh;
	bcmsdh->init_success = true;

	*regsva = (u32 *) SI_ENUM_BASE;
+4 −17
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ struct bcmsdh_hc {
#else
	struct pci_dev *dev;	/* pci device handle */
#endif				/* BCMPLATFORM_BUS */
	struct osl_info *osh;
	void *regs;		/* SDIO Host Controller address */
	bcmsdh_info_t *sdh;	/* SDIO Host Controller handle */
	void *ch;
@@ -142,7 +141,6 @@ static
#endif				/* BCMLXSDMMC */
int bcmsdh_probe(struct device *dev)
{
	struct osl_info *osh = NULL;
	bcmsdh_hc_t *sdhc = NULL;
	unsigned long regs = 0;
	bcmsdh_info_t *sdh = NULL;
@@ -177,28 +175,21 @@ int bcmsdh_probe(struct device *dev)
	}
#endif				/* defined(OOB_INTR_ONLY) */
	/* allocate SDIO Host Controller state info */
	osh = osl_attach(dev, PCI_BUS);
	if (!osh) {
		SDLX_MSG(("%s: osl_attach failed\n", __func__));
		goto err;
	}
	sdhc = kzalloc(sizeof(bcmsdh_hc_t), GFP_ATOMIC);
	if (!sdhc) {
		SDLX_MSG(("%s: out of memory\n", __func__));
		goto err;
	}
	sdhc->osh = osh;

	sdhc->dev = (void *)dev;

#ifdef BCMLXSDMMC
	sdh = bcmsdh_attach(osh, (void *)0, (void **)&regs, irq);
	sdh = bcmsdh_attach((void *)0, (void **)&regs, irq);
	if (!sdh) {
		SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__));
		goto err;
	}
#else
	sdh = bcmsdh_attach(osh, (void *)r->start, (void **)&regs, irq);
	sdh = bcmsdh_attach((void *)r->start, (void **)&regs, irq);
	if (!sdh) {
		SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__));
		goto err;
@@ -220,7 +211,7 @@ int bcmsdh_probe(struct device *dev)

	/* try to attach to the target device */
	sdhc->ch = drvinfo.attach((vendevid >> 16), (vendevid & 0xFFFF),
				0, 0, 0, 0, (void *)regs, NULL, sdh);
				  0, 0, 0, 0, (void *)regs, sdh);
	if (!sdhc->ch) {
		SDLX_MSG(("%s: device attach failed\n", __func__));
		goto err;
@@ -235,8 +226,7 @@ int bcmsdh_probe(struct device *dev)
			bcmsdh_detach(sdhc->sdh);
		kfree(sdhc);
	}
	if (osh)
		osl_detach(osh);

	return -ENODEV;
}

@@ -246,7 +236,6 @@ static
int bcmsdh_remove(struct device *dev)
{
	bcmsdh_hc_t *sdhc, *prev;
	struct osl_info *osh;

	sdhc = sdhcinfo;
	drvinfo.detach(sdhc->ch);
@@ -269,9 +258,7 @@ int bcmsdh_remove(struct device *dev)
	}

	/* release SDIO Host Controller info */
	osh = sdhc->osh;
	kfree(sdhc);
	osl_detach(osh);

#if !defined(BCMLXSDMMC)
	dev_set_drvdata(dev, NULL);
+1 −2
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ static int sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd)
/*
 *	Public entry points & extern's
 */
extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *bar0, uint irq)
sdioh_info_t *sdioh_attach(void *bar0, uint irq)
{
	sdioh_info_t *sd;
	int err_ret;
@@ -128,7 +128,6 @@ extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *bar0, uint irq)
		sd_err(("sdioh_attach: out of memory\n"));
		return NULL;
	}
	sd->osh = osh;
	if (sdioh_sdmmc_osinit(sd) != 0) {
		sd_err(("%s:sdioh_sdmmc_osinit() failed\n", __func__));
		kfree(sd);
+2 −2
Original line number Diff line number Diff line
@@ -118,8 +118,8 @@ extern void sdioh_sdmmc_devintr_off(sdioh_info_t *sd);
 */

/* Register mapping routines */
extern u32 *sdioh_sdmmc_reg_map(struct osl_info *osh, s32 addr, int size);
extern void sdioh_sdmmc_reg_unmap(struct osl_info *osh, s32 addr, int size);
extern u32 *sdioh_sdmmc_reg_map(s32 addr, int size);
extern void sdioh_sdmmc_reg_unmap(s32 addr, int size);

/* Interrupt (de)registration routines */
extern int sdioh_sdmmc_register_irq(sdioh_info_t *sd, uint irq);
Loading