qcacld-3.0: Fix CNSS_RECOVERY undeclared issue

If without CNSS2 module, CNSS_RECOVERY undeclared issue will occur.

Move function pld_sdio_uevent() to CONFIG_PLD_SDIO_CNSS2 macro,
because it is active only when CONFIG_PLD_SDIO_CNSS2 is defined.

Change-Id: Ic86260ccefad820c47257a8ccbcfae9194b78b8f
CRs-Fixed: 2530671
This commit is contained in:
Yu Ouyang 2019-09-19 10:14:06 +08:00 committed by nshrivas
parent f6eac52f9d
commit 523f56e6c3

View File

@ -122,34 +122,6 @@ static void pld_sdio_remove(struct sdio_func *sdio_func)
pld_del_dev(pld_context, dev);
}
static void pld_sdio_uevent(struct sdio_func *sdio_func, uint32_t status)
{
struct pld_context *pld_context;
struct device *dev = &sdio_func->dev;
struct pld_uevent_data data;
pld_context = pld_get_global_context();
if (!pld_context)
return;
switch (status) {
case CNSS_RECOVERY:
data.uevent = PLD_FW_RECOVERY_START;
break;
case CNSS_FW_DOWN:
data.uevent = PLD_FW_DOWN;
break;
default:
goto out;
}
if (pld_context->ops->uevent)
pld_context->ops->uevent(dev, &data);
out:
return;
}
#ifdef CONFIG_PLD_SDIO_CNSS
/**
* pld_sdio_reinit() - SSR re-initialize function for SDIO device
@ -349,6 +321,34 @@ static void pld_sdio_crash_shutdown(struct sdio_func *sdio_func)
/* TODO */
}
static void pld_sdio_uevent(struct sdio_func *sdio_func, uint32_t status)
{
struct pld_context *pld_context;
struct device *dev = &sdio_func->dev;
struct pld_uevent_data data;
pld_context = pld_get_global_context();
if (!pld_context)
return;
switch (status) {
case CNSS_RECOVERY:
data.uevent = PLD_FW_RECOVERY_START;
break;
case CNSS_FW_DOWN:
data.uevent = PLD_FW_DOWN;
break;
default:
goto out;
}
if (pld_context->ops->uevent)
pld_context->ops->uevent(dev, &data);
out:
return;
}
struct cnss_sdio_wlan_driver pld_sdio_ops = {
.name = "pld_sdio",
.id_table = pld_sdio_id_table,