Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: qt1070 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()

SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection
against unused function warnings. The new combination of pm_sleep_ptr()
and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions,
thus suppressing the warning, but still allowing the unused code to be
removed. Thus also drop the ifdef guards.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20221204180841.2211588-22-jic23@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Jonathan Cameron and committed by
Dmitry Torokhov
9254ed3f a4b4fa51

+2 -4
+2 -4
drivers/input/keyboard/qt1070.c
··· 226 226 kfree(data); 227 227 } 228 228 229 - #ifdef CONFIG_PM_SLEEP 230 229 static int qt1070_suspend(struct device *dev) 231 230 { 232 231 struct i2c_client *client = to_i2c_client(dev); ··· 247 248 248 249 return 0; 249 250 } 250 - #endif 251 251 252 - static SIMPLE_DEV_PM_OPS(qt1070_pm_ops, qt1070_suspend, qt1070_resume); 252 + static DEFINE_SIMPLE_DEV_PM_OPS(qt1070_pm_ops, qt1070_suspend, qt1070_resume); 253 253 254 254 static const struct i2c_device_id qt1070_id[] = { 255 255 { "qt1070", 0 }, ··· 268 270 .driver = { 269 271 .name = "qt1070", 270 272 .of_match_table = of_match_ptr(qt1070_of_match), 271 - .pm = &qt1070_pm_ops, 273 + .pm = pm_sleep_ptr(&qt1070_pm_ops), 272 274 }, 273 275 .id_table = qt1070_id, 274 276 .probe_new = qt1070_probe,