diff options
| author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-08-09 17:00:13 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-08-10 08:29:43 -0400 |
| commit | 3567a4e2c52ce2f6fe74fc85690335ec7c96608e (patch) | |
| tree | 2400504d924d59932000d6f25ded5b04cb1e1bbf | |
| parent | 9069240480e24a2d6ce23404c9ad6cabf59b7258 (diff) | |
platform / x86 / PM: Fix unused function warnings for CONFIG_PM_SLEEP
According to compiler warnings, quite some suspend/resume functions
in platform x86 drivers are not used for CONFIG_PM_SLEEP unset, so
add #ifdefs to prevent them from being built in that case.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| -rw-r--r-- | drivers/platform/x86/classmate-laptop.c | 4 | ||||
| -rw-r--r-- | drivers/platform/x86/fujitsu-tablet.c | 2 | ||||
| -rw-r--r-- | drivers/platform/x86/hdaps.c | 2 | ||||
| -rw-r--r-- | drivers/platform/x86/hp_accel.c | 2 | ||||
| -rw-r--r-- | drivers/platform/x86/msi-laptop.c | 4 | ||||
| -rw-r--r-- | drivers/platform/x86/panasonic-laptop.c | 4 | ||||
| -rw-r--r-- | drivers/platform/x86/sony-laptop.c | 12 | ||||
| -rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 2 | ||||
| -rw-r--r-- | drivers/platform/x86/toshiba_acpi.c | 2 | ||||
| -rw-r--r-- | drivers/platform/x86/toshiba_bluetooth.c | 4 | ||||
| -rw-r--r-- | drivers/platform/x86/xo15-ebook.c | 2 |
11 files changed, 38 insertions, 2 deletions
diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c index 2ca7dd1ab3e4..cd33add118ce 100644 --- a/drivers/platform/x86/classmate-laptop.c +++ b/drivers/platform/x86/classmate-laptop.c | |||
| @@ -350,6 +350,7 @@ static void cmpc_accel_idev_init_v4(struct input_dev *inputdev) | |||
| 350 | inputdev->close = cmpc_accel_close_v4; | 350 | inputdev->close = cmpc_accel_close_v4; |
| 351 | } | 351 | } |
| 352 | 352 | ||
| 353 | #ifdef CONFIG_PM_SLEEP | ||
| 353 | static int cmpc_accel_suspend_v4(struct device *dev) | 354 | static int cmpc_accel_suspend_v4(struct device *dev) |
| 354 | { | 355 | { |
| 355 | struct input_dev *inputdev; | 356 | struct input_dev *inputdev; |
| @@ -384,6 +385,7 @@ static int cmpc_accel_resume_v4(struct device *dev) | |||
| 384 | 385 | ||
| 385 | return 0; | 386 | return 0; |
| 386 | } | 387 | } |
| 388 | #endif | ||
| 387 | 389 | ||
| 388 | static int cmpc_accel_add_v4(struct acpi_device *acpi) | 390 | static int cmpc_accel_add_v4(struct acpi_device *acpi) |
| 389 | { | 391 | { |
| @@ -752,6 +754,7 @@ static int cmpc_tablet_remove(struct acpi_device *acpi, int type) | |||
| 752 | return cmpc_remove_acpi_notify_device(acpi); | 754 | return cmpc_remove_acpi_notify_device(acpi); |
| 753 | } | 755 | } |
| 754 | 756 | ||
| 757 | #ifdef CONFIG_PM_SLEEP | ||
| 755 | static int cmpc_tablet_resume(struct device *dev) | 758 | static int cmpc_tablet_resume(struct device *dev) |
| 756 | { | 759 | { |
| 757 | struct input_dev *inputdev = dev_get_drvdata(dev); | 760 | struct input_dev *inputdev = dev_get_drvdata(dev); |
| @@ -761,6 +764,7 @@ static int cmpc_tablet_resume(struct device *dev) | |||
| 761 | input_report_switch(inputdev, SW_TABLET_MODE, !val); | 764 | input_report_switch(inputdev, SW_TABLET_MODE, !val); |
| 762 | return 0; | 765 | return 0; |
| 763 | } | 766 | } |
| 767 | #endif | ||
| 764 | 768 | ||
| 765 | static SIMPLE_DEV_PM_OPS(cmpc_tablet_pm, NULL, cmpc_tablet_resume); | 769 | static SIMPLE_DEV_PM_OPS(cmpc_tablet_pm, NULL, cmpc_tablet_resume); |
| 766 | 770 | ||
diff --git a/drivers/platform/x86/fujitsu-tablet.c b/drivers/platform/x86/fujitsu-tablet.c index d2e41735a47b..7acae3f85f3b 100644 --- a/drivers/platform/x86/fujitsu-tablet.c +++ b/drivers/platform/x86/fujitsu-tablet.c | |||
| @@ -440,11 +440,13 @@ static int __devexit acpi_fujitsu_remove(struct acpi_device *adev, int type) | |||
| 440 | return 0; | 440 | return 0; |
| 441 | } | 441 | } |
| 442 | 442 | ||
| 443 | #ifdef CONFIG_PM_SLEEP | ||
| 443 | static int acpi_fujitsu_resume(struct device *dev) | 444 | static int acpi_fujitsu_resume(struct device *dev) |
| 444 | { | 445 | { |
| 445 | fujitsu_reset(); | 446 | fujitsu_reset(); |
| 446 | return 0; | 447 | return 0; |
| 447 | } | 448 | } |
| 449 | #endif | ||
| 448 | 450 | ||
| 449 | static SIMPLE_DEV_PM_OPS(acpi_fujitsu_pm, NULL, acpi_fujitsu_resume); | 451 | static SIMPLE_DEV_PM_OPS(acpi_fujitsu_pm, NULL, acpi_fujitsu_resume); |
| 450 | 452 | ||
diff --git a/drivers/platform/x86/hdaps.c b/drivers/platform/x86/hdaps.c index d9ab6f64dcec..777c7e3dda51 100644 --- a/drivers/platform/x86/hdaps.c +++ b/drivers/platform/x86/hdaps.c | |||
| @@ -305,10 +305,12 @@ static int hdaps_probe(struct platform_device *dev) | |||
| 305 | return 0; | 305 | return 0; |
| 306 | } | 306 | } |
| 307 | 307 | ||
| 308 | #ifdef CONFIG_PM_SLEEP | ||
| 308 | static int hdaps_resume(struct device *dev) | 309 | static int hdaps_resume(struct device *dev) |
| 309 | { | 310 | { |
| 310 | return hdaps_device_init(); | 311 | return hdaps_device_init(); |
| 311 | } | 312 | } |
| 313 | #endif | ||
| 312 | 314 | ||
| 313 | static SIMPLE_DEV_PM_OPS(hdaps_pm, NULL, hdaps_resume); | 315 | static SIMPLE_DEV_PM_OPS(hdaps_pm, NULL, hdaps_resume); |
| 314 | 316 | ||
diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp_accel.c index f4d91154ad67..6b9af989632b 100644 --- a/drivers/platform/x86/hp_accel.c +++ b/drivers/platform/x86/hp_accel.c | |||
| @@ -352,7 +352,7 @@ static int lis3lv02d_remove(struct acpi_device *device, int type) | |||
| 352 | } | 352 | } |
| 353 | 353 | ||
| 354 | 354 | ||
| 355 | #ifdef CONFIG_PM | 355 | #ifdef CONFIG_PM_SLEEP |
| 356 | static int lis3lv02d_suspend(struct device *dev) | 356 | static int lis3lv02d_suspend(struct device *dev) |
| 357 | { | 357 | { |
| 358 | /* make sure the device is off when we suspend */ | 358 | /* make sure the device is off when we suspend */ |
diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c index f64441844317..2111dbb7e1e3 100644 --- a/drivers/platform/x86/msi-laptop.c +++ b/drivers/platform/x86/msi-laptop.c | |||
| @@ -85,7 +85,9 @@ | |||
| 85 | #define MSI_STANDARD_EC_TOUCHPAD_ADDRESS 0xe4 | 85 | #define MSI_STANDARD_EC_TOUCHPAD_ADDRESS 0xe4 |
| 86 | #define MSI_STANDARD_EC_TOUCHPAD_MASK (1 << 4) | 86 | #define MSI_STANDARD_EC_TOUCHPAD_MASK (1 << 4) |
| 87 | 87 | ||
| 88 | #ifdef CONFIG_PM_SLEEP | ||
| 88 | static int msi_laptop_resume(struct device *device); | 89 | static int msi_laptop_resume(struct device *device); |
| 90 | #endif | ||
| 89 | static SIMPLE_DEV_PM_OPS(msi_laptop_pm, NULL, msi_laptop_resume); | 91 | static SIMPLE_DEV_PM_OPS(msi_laptop_pm, NULL, msi_laptop_resume); |
| 90 | 92 | ||
| 91 | #define MSI_STANDARD_EC_DEVICES_EXISTS_ADDRESS 0x2f | 93 | #define MSI_STANDARD_EC_DEVICES_EXISTS_ADDRESS 0x2f |
| @@ -753,6 +755,7 @@ err_bluetooth: | |||
| 753 | return retval; | 755 | return retval; |
| 754 | } | 756 | } |
| 755 | 757 | ||
| 758 | #ifdef CONFIG_PM_SLEEP | ||
| 756 | static int msi_laptop_resume(struct device *device) | 759 | static int msi_laptop_resume(struct device *device) |
| 757 | { | 760 | { |
| 758 | u8 data; | 761 | u8 data; |
| @@ -773,6 +776,7 @@ static int msi_laptop_resume(struct device *device) | |||
| 773 | 776 | ||
| 774 | return 0; | 777 | return 0; |
| 775 | } | 778 | } |
| 779 | #endif | ||
| 776 | 780 | ||
| 777 | static int __init msi_laptop_input_setup(void) | 781 | static int __init msi_laptop_input_setup(void) |
| 778 | { | 782 | { |
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index 24480074bcf0..8e8caa767d6a 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c | |||
| @@ -188,7 +188,9 @@ static const struct acpi_device_id pcc_device_ids[] = { | |||
| 188 | }; | 188 | }; |
| 189 | MODULE_DEVICE_TABLE(acpi, pcc_device_ids); | 189 | MODULE_DEVICE_TABLE(acpi, pcc_device_ids); |
| 190 | 190 | ||
| 191 | #ifdef CONFIG_PM_SLEEP | ||
| 191 | static int acpi_pcc_hotkey_resume(struct device *dev); | 192 | static int acpi_pcc_hotkey_resume(struct device *dev); |
| 193 | #endif | ||
| 192 | static SIMPLE_DEV_PM_OPS(acpi_pcc_hotkey_pm, NULL, acpi_pcc_hotkey_resume); | 194 | static SIMPLE_DEV_PM_OPS(acpi_pcc_hotkey_pm, NULL, acpi_pcc_hotkey_resume); |
| 193 | 195 | ||
| 194 | static struct acpi_driver acpi_pcc_driver = { | 196 | static struct acpi_driver acpi_pcc_driver = { |
| @@ -540,6 +542,7 @@ static void acpi_pcc_destroy_input(struct pcc_acpi *pcc) | |||
| 540 | 542 | ||
| 541 | /* kernel module interface */ | 543 | /* kernel module interface */ |
| 542 | 544 | ||
| 545 | #ifdef CONFIG_PM_SLEEP | ||
| 543 | static int acpi_pcc_hotkey_resume(struct device *dev) | 546 | static int acpi_pcc_hotkey_resume(struct device *dev) |
| 544 | { | 547 | { |
| 545 | struct pcc_acpi *pcc; | 548 | struct pcc_acpi *pcc; |
| @@ -556,6 +559,7 @@ static int acpi_pcc_hotkey_resume(struct device *dev) | |||
| 556 | 559 | ||
| 557 | return acpi_pcc_write_sset(pcc, SINF_STICKY_KEY, pcc->sticky_mode); | 560 | return acpi_pcc_write_sset(pcc, SINF_STICKY_KEY, pcc->sticky_mode); |
| 558 | } | 561 | } |
| 562 | #endif | ||
| 559 | 563 | ||
| 560 | static int acpi_pcc_hotkey_add(struct acpi_device *device) | 564 | static int acpi_pcc_hotkey_add(struct acpi_device *device) |
| 561 | { | 565 | { |
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 9363969ad07a..daaddec68def 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
| @@ -140,7 +140,10 @@ MODULE_PARM_DESC(kbd_backlight_timeout, | |||
| 140 | "1 for 30 seconds, 2 for 60 seconds and 3 to disable timeout " | 140 | "1 for 30 seconds, 2 for 60 seconds and 3 to disable timeout " |
| 141 | "(default: 0)"); | 141 | "(default: 0)"); |
