Thread (2 messages) flat view 2 messages, 2 authors, 2016-02-09

Re: [PATCH v3 3/3] mwifiex: parse host wakeup configuration from device tree

From: Arnd Bergmann <arnd@arndb.de>
Date: 2016-02-08 12:12:31
Also in: linux-devicetree

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help