linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 16/26] Input: synaptics-rmi4: Use ifdef to check if CONFIG_PM_SLEEP is set
@ 2015-11-05 23:41 Andrew Duggan
  2015-11-09 13:14 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Duggan @ 2015-11-05 23:41 UTC (permalink / raw)
  To: linux-input, linux-kernel
  Cc: Andrew Duggan, Dmitry Torokhov, Linus Walleij, Benjamin Tissoires,
	Christopher Heiny, Stephen Chandler Paul

The pm variables are not included in the struct rmi_driver_data at compile
time. Using the IS_ENABLED macro in rmi_driver.c will result in a compiler
error if CONFIG_PM_SLEEP is not enabled.

Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
---
 drivers/input/rmi4/rmi_driver.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index b569aab..54852a0 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -924,15 +924,15 @@ static int rmi_driver_probe(struct device *dev)
 		goto err_destroy_functions;
 	}
 
-	if (IS_ENABLED(CONFIG_PM_SLEEP)) {
-		data->pm_data = pdata->pm_data;
-		data->pre_suspend = pdata->pre_suspend;
-		data->post_suspend = pdata->post_suspend;
-		data->pre_resume = pdata->pre_resume;
-		data->post_resume = pdata->post_resume;
+#ifdef CONFIG_PM_SLEEP
+	data->pm_data = pdata->pm_data;
+	data->pre_suspend = pdata->pre_suspend;
+	data->post_suspend = pdata->post_suspend;
+	data->pre_resume = pdata->pre_resume;
+	data->post_resume = pdata->post_resume;
 
-		mutex_init(&data->suspend_mutex);
-	}
+	mutex_init(&data->suspend_mutex);
+#endif
 
 	if (data->input) {
 		rmi_driver_set_input_name(rmi_dev, data->input);
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 16/26] Input: synaptics-rmi4: Use ifdef to check if CONFIG_PM_SLEEP is set
  2015-11-05 23:41 [PATCH 16/26] Input: synaptics-rmi4: Use ifdef to check if CONFIG_PM_SLEEP is set Andrew Duggan
@ 2015-11-09 13:14 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2015-11-09 13:14 UTC (permalink / raw)
  To: Andrew Duggan
  Cc: Linux Input, linux-kernel@vger.kernel.org, Dmitry Torokhov,
	Benjamin Tissoires, Christopher Heiny, Stephen Chandler Paul

On Fri, Nov 6, 2015 at 12:41 AM, Andrew Duggan <aduggan@synaptics.com> wrote:

> The pm variables are not included in the struct rmi_driver_data at compile
> time. Using the IS_ENABLED macro in rmi_driver.c will result in a compiler
> error if CONFIG_PM_SLEEP is not enabled.
>
> Signed-off-by: Andrew Duggan <aduggan@synaptics.com>

Tested-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-09 13:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-05 23:41 [PATCH 16/26] Input: synaptics-rmi4: Use ifdef to check if CONFIG_PM_SLEEP is set Andrew Duggan
2015-11-09 13:14 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).