Input: synaptics-rmi4: Use ifdef to check if CONFIG_PM_SLEEP is set
Subsystems (2)
PATCH 16/26 Input: synaptics-rmi4: Use ifdef to check if CONFIG_PM_SLEEP is set
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 <[email protected]>
--- drivers/input/rmi4/rmi_driver.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/input/rmi4/rmi_driver.c +8 -8
@@ -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);
Signature · 1 line
2.1.4
Quoted 5 lines · Andrew Duggan
The pm variables are not included in the struct
rmi_driver_dataat compile time. Using theIS_ENABLEDmacro inrmi_driver.cwill result in a compiler error ifCONFIG_PM_SLEEPis not enabled.Signed-off-by Andrew Duggan <[email protected]>
Tested-by Linus Walleij <[email protected]>
Yours,
Linus Walleij