On Monday 08 February 2016 02:15:28 Amitkumar Karwar wrote:
quoted hunk
@@ -30,6 +84,44 @@ static int mwifiex_plt_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_PM_SLEEP
+static int mwifiex_plt_suspend(struct device *dev)
+{
+ struct mwifiex_wake_dev *ctx = dev_get_drvdata(dev);
+ int ret;
+
...
quoted hunk
+static const struct dev_pm_ops mwifiex_plt_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(mwifiex_plt_suspend, mwifiex_plt_resume)
+};
+#endif /* CONFIG_PM_SLEEP */
+
static const struct of_device_id mwifiex_dt_match[] = {
{
.compatible = "marvell,mwifiex",@@ -45,6 +137,9 @@ static struct platform_driver mwifiex_platform_driver = {
.driver = {
.name = "mwifiex_plt",
.of_match_table = mwifiex_dt_match,
+#ifdef CONFIG_PM_SLEEP
+ .pm = &mwifiex_plt_pm_ops,
+#endif
}
};
Just remove the #ifdef here, and mark the functions as __maybe_unused.
Arnd