[PATCH 3/4] Add ctrl_ops as device data
Eugene Krasnikov
k.eugene.e at gmail.com
Thu Aug 8 03:42:34 EDT 2013
wcn36xx must use ctrl_ops to operate with ctrl path.
Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
---
main.c | 1 +
wcn36xx_msm/main.c | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/main.c b/main.c
index 17341c2..50e70ab 100644
--- a/main.c
+++ b/main.c
@@ -1003,6 +1003,7 @@ static int __devinit wcn36xx_probe(struct platform_device *pdev)
wcn = hw->priv;
wcn->hw = hw;
wcn->dev = &pdev->dev;
+ wcn->ctrl_ops = pdev->dev.platform_data;
mutex_init(&wcn->pm_mutex);
mutex_init(&wcn->smd_mutex);
diff --git a/wcn36xx_msm/main.c b/wcn36xx_msm/main.c
index c1ede74..8827a94 100644
--- a/wcn36xx_msm/main.c
+++ b/wcn36xx_msm/main.c
@@ -68,6 +68,15 @@ static int __init wcn36xx_msm_init(void)
memcpy(&res[2], rx_irq, sizeof(*rx_irq));
platform_device_add_resources(wmsm.core, res, ARRAY_SIZE(res));
+
+ ret = platform_device_add_data(wmsm.core, &wmsm.ctrl_ops,
+ sizeof(wmsm.ctrl_ops));
+ if (ret) {
+ dev_err(&wmsm.core->dev, "Can't add platform data\n");
+ ret = -ENOMEM;
+ return ret;
+ }
+
platform_device_add(wmsm.core);
return 0;
}
--
1.8.2.2
More information about the wcn36xx
mailing list