Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1263632 > unrolled thread
| Started by | Andrew Duggan <aduggan@synaptics.com> |
|---|---|
| First post | 2015-11-06 00:50 +0100 |
| Last post | 2015-11-09 14:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 16/26] Input: synaptics-rmi4: Use ifdef to check if CONFIG_PM_SLEEP is set Andrew Duggan <aduggan@synaptics.com> - 2015-11-06 00:50 +0100
Re: [PATCH 16/26] Input: synaptics-rmi4: Use ifdef to check if CONFIG_PM_SLEEP is set Linus Walleij <linus.walleij@linaro.org> - 2015-11-09 14:20 +0100
| From | Andrew Duggan <aduggan@synaptics.com> |
|---|---|
| Date | 2015-11-06 00:50 +0100 |
| Subject | [PATCH 16/26] Input: synaptics-rmi4: Use ifdef to check if CONFIG_PM_SLEEP is set |
| Message-ID | <qrCs3-5az-37@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2015-11-09 14:20 +0100 |
| Subject | Re: [PATCH 16/26] Input: synaptics-rmi4: Use ifdef to check if CONFIG_PM_SLEEP is set |
| Message-ID | <qsUwx-6TG-5@gated-at.bofh.it> |
| In reply to | #1263632 |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web