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

Input: touchscreen - use __maybe_unused instead of ifdef around suspend/resume

Use __maybe_unused instead of ifdef guards around suspend/resume
functions, in order to increase build coverage and fix build warnings.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Jingoo Han and committed by
Dmitry Torokhov
02b6a58b 572081a4

+38 -78
+2 -4
drivers/input/touchscreen/ad7877.c
··· 820 820 return 0; 821 821 } 822 822 823 - #ifdef CONFIG_PM_SLEEP 824 - static int ad7877_suspend(struct device *dev) 823 + static int __maybe_unused ad7877_suspend(struct device *dev) 825 824 { 826 825 struct ad7877 *ts = dev_get_drvdata(dev); 827 826 ··· 829 830 return 0; 830 831 } 831 832 832 - static int ad7877_resume(struct device *dev) 833 + static int __maybe_unused ad7877_resume(struct device *dev) 833 834 { 834 835 struct ad7877 *ts = dev_get_drvdata(dev); 835 836 ··· 837 838 838 839 return 0; 839 840 } 840 - #endif 841 841 842 842 static SIMPLE_DEV_PM_OPS(ad7877_pm, ad7877_suspend, ad7877_resume); 843 843
+2 -4
drivers/input/touchscreen/ad7879.c
··· 284 284 __ad7879_disable(ts); 285 285 } 286 286 287 - #ifdef CONFIG_PM_SLEEP 288 - static int ad7879_suspend(struct device *dev) 287 + static int __maybe_unused ad7879_suspend(struct device *dev) 289 288 { 290 289 struct ad7879 *ts = dev_get_drvdata(dev); 291 290 ··· 300 301 return 0; 301 302 } 302 303 303 - static int ad7879_resume(struct device *dev) 304 + static int __maybe_unused ad7879_resume(struct device *dev) 304 305 { 305 306 struct ad7879 *ts = dev_get_drvdata(dev); 306 307 ··· 315 316 316 317 return 0; 317 318 } 318 - #endif 319 319 320 320 SIMPLE_DEV_PM_OPS(ad7879_pm_ops, ad7879_suspend, ad7879_resume); 321 321 EXPORT_SYMBOL(ad7879_pm_ops);
+2 -4
drivers/input/touchscreen/ads7846.c
··· 883 883 return IRQ_HANDLED; 884 884 } 885 885 886 - #ifdef CONFIG_PM_SLEEP 887 - static int ads7846_suspend(struct device *dev) 886 + static int __maybe_unused ads7846_suspend(struct device *dev) 888 887 { 889 888 struct ads7846 *ts = dev_get_drvdata(dev); 890 889 ··· 905 906 return 0; 906 907 } 907 908 908 - static int ads7846_resume(struct device *dev) 909 + static int __maybe_unused ads7846_resume(struct device *dev) 909 910 { 910 911 struct ads7846 *ts = dev_get_drvdata(dev); 911 912 ··· 926 927 927 928 return 0; 928 929 } 929 - #endif 930 930 931 931 static SIMPLE_DEV_PM_OPS(ads7846_pm, ads7846_suspend, ads7846_resume); 932 932
+2 -4
drivers/input/touchscreen/atmel_mxt_ts.c
··· 2244 2244 return 0; 2245 2245 } 2246 2246 2247 - #ifdef CONFIG_PM_SLEEP 2248 - static int mxt_suspend(struct device *dev) 2247 + static int __maybe_unused mxt_suspend(struct device *dev) 2249 2248 { 2250 2249 struct i2c_client *client = to_i2c_client(dev); 2251 2250 struct mxt_data *data = i2c_get_clientdata(client); ··· 2260 2261 return 0; 2261 2262 } 2262 2263 2263 - static int mxt_resume(struct device *dev) 2264 + static int __maybe_unused mxt_resume(struct device *dev) 2264 2265 { 2265 2266 struct i2c_client *client = to_i2c_client(dev); 2266 2267 struct mxt_data *data = i2c_get_clientdata(client); ··· 2275 2276 2276 2277 return 0; 2277 2278 } 2278 - #endif 2279 2279 2280 2280 static SIMPLE_DEV_PM_OPS(mxt_pm_ops, mxt_suspend, mxt_resume); 2281 2281
+2 -4
drivers/input/touchscreen/auo-pixcir-ts.c
··· 417 417 return; 418 418 } 419 419 420 - #ifdef CONFIG_PM_SLEEP 421 - static int auo_pixcir_suspend(struct device *dev) 420 + static int __maybe_unused auo_pixcir_suspend(struct device *dev) 422 421 { 423 422 struct i2c_client *client = to_i2c_client(dev); 424 423 struct auo_pixcir_ts *ts = i2c_get_clientdata(client); ··· 449 450 return ret; 450 451 } 451 452 452 - static int auo_pixcir_resume(struct device *dev) 453 + static int __maybe_unused auo_pixcir_resume(struct device *dev) 453 454 { 454 455 struct i2c_client *client = to_i2c_client(dev); 455 456 struct auo_pixcir_ts *ts = i2c_get_clientdata(client); ··· 478 479 479 480 return ret; 480 481 } 481 - #endif 482 482 483 483 static SIMPLE_DEV_PM_OPS(auo_pixcir_pm_ops, 484 484 auo_pixcir_suspend, auo_pixcir_resume);
+2 -4
drivers/input/touchscreen/cy8ctmg110_ts.c
··· 291 291 return err; 292 292 } 293 293 294 - #ifdef CONFIG_PM_SLEEP 295 - static int cy8ctmg110_suspend(struct device *dev) 294 + static int __maybe_unused cy8ctmg110_suspend(struct device *dev) 296 295 { 297 296 struct i2c_client *client = to_i2c_client(dev); 298 297 struct cy8ctmg110 *ts = i2c_get_clientdata(client); ··· 305 306 return 0; 306 307 } 307 308 308 - static int cy8ctmg110_resume(struct device *dev) 309 + static int __maybe_unused cy8ctmg110_resume(struct device *dev) 309 310 { 310 311 struct i2c_client *client = to_i2c_client(dev); 311 312 struct cy8ctmg110 *ts = i2c_get_clientdata(client); ··· 318 319 } 319 320 return 0; 320 321 } 321 - #endif 322 322 323 323 static SIMPLE_DEV_PM_OPS(cy8ctmg110_pm, cy8ctmg110_suspend, cy8ctmg110_resume); 324 324
+2 -5
drivers/input/touchscreen/cyttsp_core.c
··· 472 472 return 0; 473 473 } 474 474 475 - #ifdef CONFIG_PM_SLEEP 476 - static int cyttsp_suspend(struct device *dev) 475 + static int __maybe_unused cyttsp_suspend(struct device *dev) 477 476 { 478 477 struct cyttsp *ts = dev_get_drvdata(dev); 479 478 int retval = 0; ··· 490 491 return retval; 491 492 } 492 493 493 - static int cyttsp_resume(struct device *dev) 494 + static int __maybe_unused cyttsp_resume(struct device *dev) 494 495 { 495 496 struct cyttsp *ts = dev_get_drvdata(dev); 496 497 ··· 505 506 506 507 return 0; 507 508 } 508 - 509 - #endif 510 509 511 510 SIMPLE_DEV_PM_OPS(cyttsp_pm_ops, cyttsp_suspend, cyttsp_resume); 512 511 EXPORT_SYMBOL_GPL(cyttsp_pm_ops);
+2 -4
drivers/input/touchscreen/edt-ft5x06.c
··· 1092 1092 return 0; 1093 1093 } 1094 1094 1095 - #ifdef CONFIG_PM_SLEEP 1096 - static int edt_ft5x06_ts_suspend(struct device *dev) 1095 + static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev) 1097 1096 { 1098 1097 struct i2c_client *client = to_i2c_client(dev); 1099 1098 ··· 1102 1103 return 0; 1103 1104 } 1104 1105 1105 - static int edt_ft5x06_ts_resume(struct device *dev) 1106 + static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev) 1106 1107 { 1107 1108 struct i2c_client *client = to_i2c_client(dev); 1108 1109 ··· 1111 1112 1112 1113 return 0; 1113 1114 } 1114 - #endif 1115 1115 1116 1116 static SIMPLE_DEV_PM_OPS(edt_ft5x06_ts_pm_ops, 1117 1117 edt_ft5x06_ts_suspend, edt_ft5x06_ts_resume);
+2 -4
drivers/input/touchscreen/eeti_ts.c
··· 264 264 return 0; 265 265 } 266 266 267 - #ifdef CONFIG_PM_SLEEP 268 - static int eeti_ts_suspend(struct device *dev) 267 + static int __maybe_unused eeti_ts_suspend(struct device *dev) 269 268 { 270 269 struct i2c_client *client = to_i2c_client(dev); 271 270 struct eeti_ts_priv *priv = i2c_get_clientdata(client); ··· 283 284 return 0; 284 285 } 285 286 286 - static int eeti_ts_resume(struct device *dev) 287 + static int __maybe_unused eeti_ts_resume(struct device *dev) 287 288 { 288 289 struct i2c_client *client = to_i2c_client(dev); 289 290 struct eeti_ts_priv *priv = i2c_get_clientdata(client); ··· 301 302 302 303 return 0; 303 304 } 304 - #endif 305 305 306 306 static SIMPLE_DEV_PM_OPS(eeti_ts_pm, eeti_ts_suspend, eeti_ts_resume); 307 307
+2 -4
drivers/input/touchscreen/egalax_ts.c
··· 239 239 }; 240 240 MODULE_DEVICE_TABLE(i2c, egalax_ts_id); 241 241 242 - #ifdef CONFIG_PM_SLEEP 243 - static int egalax_ts_suspend(struct device *dev) 242 + static int __maybe_unused egalax_ts_suspend(struct device *dev) 244 243 { 245 244 static const u8 suspend_cmd[MAX_I2C_DATA_LEN] = { 246 245 0x3, 0x6, 0xa, 0x3, 0x36, 0x3f, 0x2, 0, 0, 0 ··· 251 252 return ret > 0 ? 0 : ret; 252 253 } 253 254 254 - static int egalax_ts_resume(struct device *dev) 255 + static int __maybe_unused egalax_ts_resume(struct device *dev) 255 256 { 256 257 struct i2c_client *client = to_i2c_client(dev); 257 258 258 259 return egalax_wake_up_device(client); 259 260 } 260 - #endif 261 261 262 262 static SIMPLE_DEV_PM_OPS(egalax_ts_pm_ops, egalax_ts_suspend, egalax_ts_resume); 263 263
+2 -4
drivers/input/touchscreen/ili210x.c
··· 311 311 return 0; 312 312 } 313 313 314 - #ifdef CONFIG_PM_SLEEP 315 - static int ili210x_i2c_suspend(struct device *dev) 314 + static int __maybe_unused ili210x_i2c_suspend(struct device *dev) 316 315 { 317 316 struct i2c_client *client = to_i2c_client(dev); 318 317 ··· 321 322 return 0; 322 323 } 323 324 324 - static int ili210x_i2c_resume(struct device *dev) 325 + static int __maybe_unused ili210x_i2c_resume(struct device *dev) 325 326 { 326 327 struct i2c_client *client = to_i2c_client(dev); 327 328 ··· 330 331 331 332 return 0; 332 333 } 333 - #endif 334 334 335 335 static SIMPLE_DEV_PM_OPS(ili210x_i2c_pm, 336 336 ili210x_i2c_suspend, ili210x_i2c_resume);
+2 -4
drivers/input/touchscreen/ipaq-micro-ts.c
··· 122 122 return 0; 123 123 } 124 124 125 - #ifdef CONFIG_PM_SLEEP 126 - static int micro_ts_suspend(struct device *dev) 125 + static int __maybe_unused micro_ts_suspend(struct device *dev) 127 126 { 128 127 struct touchscreen_data *ts = dev_get_drvdata(dev); 129 128 ··· 131 132 return 0; 132 133 } 133 134 134 - static int micro_ts_resume(struct device *dev) 135 + static int __maybe_unused micro_ts_resume(struct device *dev) 135 136 { 136 137 struct touchscreen_data *ts = dev_get_drvdata(dev); 137 138 struct input_dev *input = ts->input; ··· 145 146 146 147 return 0; 147 148 } 148 - #endif 149 149 150 150 static const struct dev_pm_ops micro_ts_dev_pm_ops = { 151 151 SET_SYSTEM_SLEEP_PM_OPS(micro_ts_suspend, micro_ts_resume)
+2 -4
drivers/input/touchscreen/mms114.c
··· 515 515 return 0; 516 516 } 517 517 518 - #ifdef CONFIG_PM_SLEEP 519 - static int mms114_suspend(struct device *dev) 518 + static int __maybe_unused mms114_suspend(struct device *dev) 520 519 { 521 520 struct i2c_client *client = to_i2c_client(dev); 522 521 struct mms114_data *data = i2c_get_clientdata(client); ··· 539 540 return 0; 540 541 } 541 542 542 - static int mms114_resume(struct device *dev) 543 + static int __maybe_unused mms114_resume(struct device *dev) 543 544 { 544 545 struct i2c_client *client = to_i2c_client(dev); 545 546 struct mms114_data *data = i2c_get_clientdata(client); ··· 558 559 559 560 return 0; 560 561 } 561 - #endif 562 562 563 563 static SIMPLE_DEV_PM_OPS(mms114_pm_ops, mms114_suspend, mms114_resume); 564 564
+2 -4
drivers/input/touchscreen/pixcir_i2c_ts.c
··· 347 347 pixcir_stop(ts); 348 348 } 349 349 350 - #ifdef CONFIG_PM_SLEEP 351 - static int pixcir_i2c_ts_suspend(struct device *dev) 350 + static int __maybe_unused pixcir_i2c_ts_suspend(struct device *dev) 352 351 { 353 352 struct i2c_client *client = to_i2c_client(dev); 354 353 struct pixcir_i2c_ts_data *ts = i2c_get_clientdata(client); ··· 376 377 return ret; 377 378 } 378 379 379 - static int pixcir_i2c_ts_resume(struct device *dev) 380 + static int __maybe_unused pixcir_i2c_ts_resume(struct device *dev) 380 381 { 381 382 struct i2c_client *client = to_i2c_client(dev); 382 383 struct pixcir_i2c_ts_data *ts = i2c_get_clientdata(client); ··· 404 405 405 406 return ret; 406 407 } 407 - #endif 408 408 409 409 static SIMPLE_DEV_PM_OPS(pixcir_dev_pm_ops, 410 410 pixcir_i2c_ts_suspend, pixcir_i2c_ts_resume);
+2 -5
drivers/input/touchscreen/st1232.c
··· 243 243 return 0; 244 244 } 245 245 246 - #ifdef CONFIG_PM_SLEEP 247 - static int st1232_ts_suspend(struct device *dev) 246 + static int __maybe_unused st1232_ts_suspend(struct device *dev) 248 247 { 249 248 struct i2c_client *client = to_i2c_client(dev); 250 249 struct st1232_ts_data *ts = i2c_get_clientdata(client); ··· 258 259 return 0; 259 260 } 260 261 261 - static int st1232_ts_resume(struct device *dev) 262 + static int __maybe_unused st1232_ts_resume(struct device *dev) 262 263 { 263 264 struct i2c_client *client = to_i2c_client(dev); 264 265 struct st1232_ts_data *ts = i2c_get_clientdata(client); ··· 272 273 273 274 return 0; 274 275 } 275 - 276 - #endif 277 276 278 277 static SIMPLE_DEV_PM_OPS(st1232_ts_pm_ops, 279 278 st1232_ts_suspend, st1232_ts_resume);
+2 -4
drivers/input/touchscreen/tsc2005.c
··· 773 773 return 0; 774 774 } 775 775 776 - #ifdef CONFIG_PM_SLEEP 777 - static int tsc2005_suspend(struct device *dev) 776 + static int __maybe_unused tsc2005_suspend(struct device *dev) 778 777 { 779 778 struct spi_device *spi = to_spi_device(dev); 780 779 struct tsc2005 *ts = spi_get_drvdata(spi); ··· 790 791 return 0; 791 792 } 792 793 793 - static int tsc2005_resume(struct device *dev) 794 + static int __maybe_unused tsc2005_resume(struct device *dev) 794 795 { 795 796 struct spi_device *spi = to_spi_device(dev); 796 797 struct tsc2005 *ts = spi_get_drvdata(spi); ··· 806 807 807 808 return 0; 808 809 } 809 - #endif 810 810 811 811 static SIMPLE_DEV_PM_OPS(tsc2005_pm_ops, tsc2005_suspend, tsc2005_resume); 812 812
+2 -4
drivers/input/touchscreen/ucb1400_ts.c
··· 406 406 return 0; 407 407 } 408 408 409 - #ifdef CONFIG_PM_SLEEP 410 - static int ucb1400_ts_suspend(struct device *dev) 409 + static int __maybe_unused ucb1400_ts_suspend(struct device *dev) 411 410 { 412 411 struct ucb1400_ts *ucb = dev_get_platdata(dev); 413 412 struct input_dev *idev = ucb->ts_idev; ··· 420 421 return 0; 421 422 } 422 423 423 - static int ucb1400_ts_resume(struct device *dev) 424 + static int __maybe_unused ucb1400_ts_resume(struct device *dev) 424 425 { 425 426 struct ucb1400_ts *ucb = dev_get_platdata(dev); 426 427 struct input_dev *idev = ucb->ts_idev; ··· 433 434 mutex_unlock(&idev->mutex); 434 435 return 0; 435 436 } 436 - #endif 437 437 438 438 static SIMPLE_DEV_PM_OPS(ucb1400_ts_pm_ops, 439 439 ucb1400_ts_suspend, ucb1400_ts_resume);
+2 -4
drivers/input/touchscreen/wacom_i2c.c
··· 242 242 return 0; 243 243 } 244 244 245 - #ifdef CONFIG_PM_SLEEP 246 - static int wacom_i2c_suspend(struct device *dev) 245 + static int __maybe_unused wacom_i2c_suspend(struct device *dev) 247 246 { 248 247 struct i2c_client *client = to_i2c_client(dev); 249 248 ··· 251 252 return 0; 252 253 } 253 254 254 - static int wacom_i2c_resume(struct device *dev) 255 + static int __maybe_unused wacom_i2c_resume(struct device *dev) 255 256 { 256 257 struct i2c_client *client = to_i2c_client(dev); 257 258 ··· 259 260 260 261 return 0; 261 262 } 262 - #endif 263 263 264 264 static SIMPLE_DEV_PM_OPS(wacom_i2c_pm, wacom_i2c_suspend, wacom_i2c_resume); 265 265
+2 -4
drivers/input/touchscreen/zforce_ts.c
··· 602 602 return; 603 603 } 604 604 605 - #ifdef CONFIG_PM_SLEEP 606 - static int zforce_suspend(struct device *dev) 605 + static int __maybe_unused zforce_suspend(struct device *dev) 607 606 { 608 607 struct i2c_client *client = to_i2c_client(dev); 609 608 struct zforce_ts *ts = i2c_get_clientdata(client); ··· 647 648 return ret; 648 649 } 649 650 650 - static int zforce_resume(struct device *dev) 651 + static int __maybe_unused zforce_resume(struct device *dev) 651 652 { 652 653 struct i2c_client *client = to_i2c_client(dev); 653 654 struct zforce_ts *ts = i2c_get_clientdata(client); ··· 684 685 685 686 return ret; 686 687 } 687 - #endif 688 688 689 689 static SIMPLE_DEV_PM_OPS(zforce_pm_ops, zforce_suspend, zforce_resume); 690 690