summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/cw1200/cw1200_plat.h2
-rw-r--r--drivers/staging/cw1200/cw1200_sdio.c11
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/staging/cw1200/cw1200_plat.h b/drivers/staging/cw1200/cw1200_plat.h
index e79794f42a3..4d30dbd3979 100644
--- a/drivers/staging/cw1200/cw1200_plat.h
+++ b/drivers/staging/cw1200/cw1200_plat.h
@@ -16,6 +16,8 @@ struct cw1200_platform_data {
const struct resource *reset;
int (*power_ctrl)(const struct cw1200_platform_data *pdata,
bool enable);
+ int (*clk_ctrl)(const struct cw1200_platform_data *pdata,
+ bool enable);
};
/* Declaration only. Should be implemented in arch/xxx/mach-yyy */
diff --git a/drivers/staging/cw1200/cw1200_sdio.c b/drivers/staging/cw1200/cw1200_sdio.c
index b04f31e0684..cd432655bff 100644
--- a/drivers/staging/cw1200/cw1200_sdio.c
+++ b/drivers/staging/cw1200/cw1200_sdio.c
@@ -388,6 +388,12 @@ static int __init cw1200_sdio_init(void)
if (ret)
goto err_reg;
+ if (pdata->clk_ctrl) {
+ ret = pdata->clk_ctrl(pdata, true);
+ if (ret)
+ goto err_clk;
+ }
+
if (pdata->power_ctrl) {
ret = pdata->power_ctrl(pdata, true);
if (ret)
@@ -404,6 +410,9 @@ err_on:
if (pdata->power_ctrl)
pdata->power_ctrl(pdata, false);
err_power:
+ if (pdata->clk_ctrl)
+ pdata->clk_ctrl(pdata, false);
+err_clk:
sdio_unregister_driver(&sdio_driver);
err_reg:
return ret;
@@ -418,6 +427,8 @@ static void __exit cw1200_sdio_exit(void)
cw1200_sdio_off(pdata);
if (pdata->power_ctrl)
pdata->power_ctrl(pdata, false);
+ if (pdata->clk_ctrl)
+ pdata->clk_ctrl(pdata, false);
}