提交 17621e11 编写于 作者: R Rafael J. Wysocki

ACPI / PM: Drop pm_message_t argument from device suspend callback

None of the drivers implementing the ACPI device suspend callback
uses the pm_message_t argument of it, so this argument may be dropped
entirely from that callback.  This will simplify switching the ACPI
bus type to PM handling based on struct dev_pm_ops.
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
上级 6887a413
...@@ -46,7 +46,7 @@ MODULE_LICENSE("GPL"); ...@@ -46,7 +46,7 @@ MODULE_LICENSE("GPL");
static int acpi_fan_add(struct acpi_device *device); static int acpi_fan_add(struct acpi_device *device);
static int acpi_fan_remove(struct acpi_device *device, int type); static int acpi_fan_remove(struct acpi_device *device, int type);
static int acpi_fan_suspend(struct acpi_device *device, pm_message_t state); static int acpi_fan_suspend(struct acpi_device *device);
static int acpi_fan_resume(struct acpi_device *device); static int acpi_fan_resume(struct acpi_device *device);
static const struct acpi_device_id fan_device_ids[] = { static const struct acpi_device_id fan_device_ids[] = {
...@@ -183,7 +183,7 @@ static int acpi_fan_remove(struct acpi_device *device, int type) ...@@ -183,7 +183,7 @@ static int acpi_fan_remove(struct acpi_device *device, int type)
return 0; return 0;
} }
static int acpi_fan_suspend(struct acpi_device *device, pm_message_t state) static int acpi_fan_suspend(struct acpi_device *device)
{ {
if (!device) if (!device)
return -EINVAL; return -EINVAL;
......
...@@ -241,7 +241,7 @@ static void acpi_idle_bm_rld_restore(void) ...@@ -241,7 +241,7 @@ static void acpi_idle_bm_rld_restore(void)
acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, saved_bm_rld); acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, saved_bm_rld);
} }
int acpi_processor_suspend(struct acpi_device * device, pm_message_t state) int acpi_processor_suspend(struct acpi_device * device)
{ {
if (acpi_idle_suspend == 1) if (acpi_idle_suspend == 1)
return 0; return 0;
......
...@@ -296,7 +296,7 @@ static int acpi_device_suspend(struct device *dev, pm_message_t state) ...@@ -296,7 +296,7 @@ static int acpi_device_suspend(struct device *dev, pm_message_t state)
struct acpi_driver *acpi_drv = acpi_dev->driver; struct acpi_driver *acpi_drv = acpi_dev->driver;
if (acpi_drv && acpi_drv->ops.suspend) if (acpi_drv && acpi_drv->ops.suspend)
return acpi_drv->ops.suspend(acpi_dev, state); return acpi_drv->ops.suspend(acpi_dev);
return 0; return 0;
} }
......
...@@ -353,7 +353,7 @@ static int lis3lv02d_remove(struct acpi_device *device, int type) ...@@ -353,7 +353,7 @@ static int lis3lv02d_remove(struct acpi_device *device, int type)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int lis3lv02d_suspend(struct acpi_device *device, pm_message_t state) static int lis3lv02d_suspend(struct acpi_device *device)
{ {
/* make sure the device is off when we suspend */ /* make sure the device is off when we suspend */
lis3lv02d_poweroff(&lis3_dev); lis3lv02d_poweroff(&lis3_dev);
......
...@@ -4243,7 +4243,7 @@ static int sony_pic_add(struct acpi_device *device) ...@@ -4243,7 +4243,7 @@ static int sony_pic_add(struct acpi_device *device)
return result; return result;
} }
static int sony_pic_suspend(struct acpi_device *device, pm_message_t state) static int sony_pic_suspend(struct acpi_device *device)
{ {
if (sony_pic_disable(device)) if (sony_pic_disable(device))
return -ENXIO; return -ENXIO;
......
...@@ -1296,8 +1296,7 @@ static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event) ...@@ -1296,8 +1296,7 @@ static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event)
} }
} }
static int toshiba_acpi_suspend(struct acpi_device *acpi_dev, static int toshiba_acpi_suspend(struct acpi_device *acpi_dev)
pm_message_t state)
{ {
struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev); struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev);
u32 result; u32 result;
......
...@@ -117,8 +117,7 @@ struct acpi_device; ...@@ -117,8 +117,7 @@ struct acpi_device;
typedef int (*acpi_op_add) (struct acpi_device * device); typedef int (*acpi_op_add) (struct acpi_device * device);
typedef int (*acpi_op_remove) (struct acpi_device * device, int type); typedef int (*acpi_op_remove) (struct acpi_device * device, int type);
typedef int (*acpi_op_start) (struct acpi_device * device); typedef int (*acpi_op_start) (struct acpi_device * device);
typedef int (*acpi_op_suspend) (struct acpi_device * device, typedef int (*acpi_op_suspend) (struct acpi_device * device);
pm_message_t state);
typedef int (*acpi_op_resume) (struct acpi_device * device); typedef int (*acpi_op_resume) (struct acpi_device * device);
typedef int (*acpi_op_bind) (struct acpi_device * device); typedef int (*acpi_op_bind) (struct acpi_device * device);
typedef int (*acpi_op_unbind) (struct acpi_device * device); typedef int (*acpi_op_unbind) (struct acpi_device * device);
......
...@@ -334,7 +334,7 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr); ...@@ -334,7 +334,7 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr);
int acpi_processor_hotplug(struct acpi_processor *pr); int acpi_processor_hotplug(struct acpi_processor *pr);
int acpi_processor_power_exit(struct acpi_processor *pr, int acpi_processor_power_exit(struct acpi_processor *pr,
struct acpi_device *device); struct acpi_device *device);
int acpi_processor_suspend(struct acpi_device * device, pm_message_t state); int acpi_processor_suspend(struct acpi_device * device);
int acpi_processor_resume(struct acpi_device * device); int acpi_processor_resume(struct acpi_device * device);
extern struct cpuidle_driver acpi_idle_driver; extern struct cpuidle_driver acpi_idle_driver;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册