From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966047AbbKEXlU (ORCPT ); Thu, 5 Nov 2015 18:41:20 -0500 Received: from us-mx2.synaptics.com ([192.147.44.131]:31735 "EHLO us-mx1.synaptics.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965324AbbKEXlR (ORCPT ); Thu, 5 Nov 2015 18:41:17 -0500 X-PGP-Universal: processed; by securemail.synaptics.com on Thu, 05 Nov 2015 16:41:40 -0800 From: Andrew Duggan To: , CC: Andrew Duggan , Dmitry Torokhov , Linus Walleij , Benjamin Tissoires , Christopher Heiny , Stephen Chandler Paul Subject: [PATCH 16/26] Input: synaptics-rmi4: Use ifdef to check if CONFIG_PM_SLEEP is set Date: Thu, 5 Nov 2015 15:41:10 -0800 Message-ID: <1446766870-30942-1-git-send-email-aduggan@synaptics.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.4.10.145] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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