Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3567a4e2 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

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: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent 90692404
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -350,6 +350,7 @@ static void cmpc_accel_idev_init_v4(struct input_dev *inputdev)
	inputdev->close = cmpc_accel_close_v4;
	inputdev->close = cmpc_accel_close_v4;
}
}


#ifdef CONFIG_PM_SLEEP
static int cmpc_accel_suspend_v4(struct device *dev)
static int cmpc_accel_suspend_v4(struct device *dev)
{
{
	struct input_dev *inputdev;
	struct input_dev *inputdev;
@@ -384,6 +385,7 @@ static int cmpc_accel_resume_v4(struct device *dev)


	return 0;
	return 0;
}
}
#endif


static int cmpc_accel_add_v4(struct acpi_device *acpi)
static int cmpc_accel_add_v4(struct acpi_device *acpi)
{
{
@@ -752,6 +754,7 @@ static int cmpc_tablet_remove(struct acpi_device *acpi, int type)
	return cmpc_remove_acpi_notify_device(acpi);
	return cmpc_remove_acpi_notify_device(acpi);
}
}


#ifdef CONFIG_PM_SLEEP
static int cmpc_tablet_resume(struct device *dev)
static int cmpc_tablet_resume(struct device *dev)
{
{
	struct input_dev *inputdev = dev_get_drvdata(dev);
	struct input_dev *inputdev = dev_get_drvdata(dev);
@@ -761,6 +764,7 @@ static int cmpc_tablet_resume(struct device *dev)
		input_report_switch(inputdev, SW_TABLET_MODE, !val);
		input_report_switch(inputdev, SW_TABLET_MODE, !val);
	return 0;
	return 0;
}
}
#endif


static SIMPLE_DEV_PM_OPS(cmpc_tablet_pm, NULL, cmpc_tablet_resume);
static SIMPLE_DEV_PM_OPS(cmpc_tablet_pm, NULL, cmpc_tablet_resume);


+2 −0
Original line number Original line Diff line number Diff line
@@ -440,11 +440,13 @@ static int __devexit acpi_fujitsu_remove(struct acpi_device *adev, int type)
	return 0;
	return 0;
}
}


#ifdef CONFIG_PM_SLEEP
static int acpi_fujitsu_resume(struct device *dev)
static int acpi_fujitsu_resume(struct device *dev)
{
{
	fujitsu_reset();
	fujitsu_reset();
	return 0;
	return 0;
}
}
#endif


static SIMPLE_DEV_PM_OPS(acpi_fujitsu_pm, NULL, acpi_fujitsu_resume);
static SIMPLE_DEV_PM_OPS(acpi_fujitsu_pm, NULL, acpi_fujitsu_resume);


+2 −0
Original line number Original line Diff line number Diff line
@@ -305,10 +305,12 @@ static int hdaps_probe(struct platform_device *dev)
	return 0;
	return 0;
}
}


#ifdef CONFIG_PM_SLEEP
static int hdaps_resume(struct device *dev)
static int hdaps_resume(struct device *dev)
{
{
	return hdaps_device_init();
	return hdaps_device_init();
}
}
#endif


static SIMPLE_DEV_PM_OPS(hdaps_pm, NULL, hdaps_resume);
static SIMPLE_DEV_PM_OPS(hdaps_pm, NULL, hdaps_resume);


+1 −1
Original line number Original line Diff line number Diff line
@@ -352,7 +352,7 @@ static int lis3lv02d_remove(struct acpi_device *device, int type)
}
}




#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int lis3lv02d_suspend(struct device *dev)
static int lis3lv02d_suspend(struct device *dev)
{
{
	/* make sure the device is off when we suspend */
	/* make sure the device is off when we suspend */
+4 −0
Original line number Original line Diff line number Diff line
@@ -85,7 +85,9 @@
#define MSI_STANDARD_EC_TOUCHPAD_ADDRESS	0xe4
#define MSI_STANDARD_EC_TOUCHPAD_ADDRESS	0xe4
#define MSI_STANDARD_EC_TOUCHPAD_MASK		(1 << 4)
#define MSI_STANDARD_EC_TOUCHPAD_MASK		(1 << 4)


#ifdef CONFIG_PM_SLEEP
static int msi_laptop_resume(struct device *device);
static int msi_laptop_resume(struct device *device);
#endif
static SIMPLE_DEV_PM_OPS(msi_laptop_pm, NULL, msi_laptop_resume);
static SIMPLE_DEV_PM_OPS(msi_laptop_pm, NULL, msi_laptop_resume);


#define MSI_STANDARD_EC_DEVICES_EXISTS_ADDRESS	0x2f
#define MSI_STANDARD_EC_DEVICES_EXISTS_ADDRESS	0x2f
@@ -753,6 +755,7 @@ static int rfkill_init(struct platform_device *sdev)
	return retval;
	return retval;
}
}


#ifdef CONFIG_PM_SLEEP
static int msi_laptop_resume(struct device *device)
static int msi_laptop_resume(struct device *device)
{
{
	u8 data;
	u8 data;
@@ -773,6 +776,7 @@ static int msi_laptop_resume(struct device *device)


	return 0;
	return 0;
}
}
#endif


static int __init msi_laptop_input_setup(void)
static int __init msi_laptop_input_setup(void)
{
{
Loading