ACPI: Remove useless type argument of driver .remove() operation
Subsystems (24)
PATCH 1/1 ACPI: Remove useless type argument of driver .remove() operation
From: Rafael J. Wysocki <[email protected]>
The second argument of ACPI driver .remove() operation is only used by the ACPI processor driver and the value passed to that driver through it is always available from the given struct acpi_device object's removal_type field. For this reason, the second ACPI driver .remove() argument is in fact useless, so drop it.
--- drivers/acpi/ac.c | 4 ++-- drivers/acpi/acpi_memhotplug.c | 4 ++-- drivers/acpi/acpi_pad.c | 3 +-- drivers/acpi/battery.c | 2 +- drivers/acpi/button.c | 4 ++-- drivers/acpi/container.c | 4 ++-- drivers/acpi/ec.c | 2 +- drivers/acpi/fan.c | 4 ++-- drivers/acpi/hed.c | 2 +- drivers/acpi/pci_link.c | 4 ++-- drivers/acpi/pci_root.c | 4 ++-- drivers/acpi/processor_driver.c | 6 +++--- drivers/acpi/sbs.c | 6 +++--- drivers/acpi/sbshc.c | 4 ++-- drivers/acpi/scan.c | 5 ++--- drivers/acpi/thermal.c | 4 ++-- drivers/acpi/video.c | 4 ++-- drivers/char/hpet.c | 2 +- drivers/char/sonypi.c | 2 +- drivers/hwmon/acpi_power_meter.c | 2 +- drivers/hwmon/asus_atk0110.c | 4 ++-- drivers/i2c/busses/i2c-scmi.c | 2 +- drivers/input/misc/atlas_btns.c | 2 +- drivers/platform/x86/asus-laptop.c | 2 +- drivers/platform/x86/classmate-laptop.c | 8 ++++---- drivers/platform/x86/eeepc-laptop.c | 2 +- drivers/platform/x86/fujitsu-laptop.c | 4 ++-- drivers/platform/x86/fujitsu-tablet.c | 2 +- drivers/platform/x86/hp_accel.c | 2 +- drivers/platform/x86/ideapad-laptop.c | 2 +- drivers/platform/x86/intel_menlow.c | 2 +- drivers/platform/x86/panasonic-laptop.c | 4 ++-- drivers/platform/x86/sony-laptop.c | 4 ++-- drivers/platform/x86/topstar-laptop.c | 2 +- drivers/platform/x86/toshiba_acpi.c | 4 ++-- drivers/platform/x86/toshiba_bluetooth.c | 4 ++-- drivers/platform/x86/wmi.c | 4 ++-- drivers/platform/x86/xo15-ebook.c | 2 +- drivers/staging/quickstart/quickstart.c | 2 +- drivers/video/backlight/apple_bl.c | 2 +- drivers/xen/xen-acpi-pad.c | 3 +-- include/acpi/acpi_bus.h | 2 +- 42 files changed, 67 insertions(+), 70 deletions(-)
include/acpi/acpi_bus.h +1 -1
@@ -89,7 +89,7 @@ struct acpi_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);typedef int (*acpi_op_start ) (struct acpi_device * device);typedef void (*acpi_op_notify ) (struct acpi_device * device,u32 event);
drivers/acpi/ec.c +1 -1
@@ -852,7 +852,7 @@ static int acpi_ec_add(struct acpi_devicreturn ret; } -static int acpi_ec_remove (struct acpi_device *device,int type) +static int acpi_ec_remove (struct acpi_device *device) {struct acpi_ec *ec;struct acpi_ec_query_handler *handler, *tmp;
drivers/acpi/pci_root.c +2 -2
@@ -46,7 +46,7 @@ ACPI_MODULE_NAME("pci_root");#define ACPI_PCI_ROOT_CLASS "pci_bridge"#define ACPI_PCI_ROOT_DEVICE_NAME "PCI Root Bridge"static int acpi_pci_root_add (struct acpi_device *device); -static int acpi_pci_root_remove (struct acpi_device *device,int type); +static int acpi_pci_root_remove (struct acpi_device *device);#define ACPI_PCIE_REQ_SUPPORT (OSC_EXT_PCI_CONFIG_SUPPORT \ | OSC_ACTIVE_STATE_PWR_SUPPORT \
@@ -609,7 +609,7 @@ end:return result; } -static int acpi_pci_root_remove (struct acpi_device *device,int type) +static int acpi_pci_root_remove (struct acpi_device *device) {acpi_status status;acpi_handle handle;
drivers/acpi/pci_link.c +2 -2
@@ -54,7 +54,7 @@ ACPI_MODULE_NAME("pci_link");#define ACPI_PCI_LINK_MAX_POSSIBLE 16static int acpi_pci_link_add (struct acpi_device *device); -static int acpi_pci_link_remove (struct acpi_device *device,int type); +static int acpi_pci_link_remove (struct acpi_device *device);static const struct acpi_device_id link_device_ids[] = { {"PNP0C0F" ,0 },
@@ -766,7 +766,7 @@ static void irqrouter_resume(void) } } -static int acpi_pci_link_remove (struct acpi_device *device,int type) +static int acpi_pci_link_remove (struct acpi_device *device) {struct acpi_pci_link *link;
drivers/char/hpet.c +1 -1
@@ -1041,7 +1041,7 @@ static int hpet_acpi_add(struct acpi_devreturn hpet_alloc (&data); } -static int hpet_acpi_remove (struct acpi_device *device,int type) +static int hpet_acpi_remove (struct acpi_device *device) {/* XXX need to unregister clocksource, dealloc mem, etc */ return -EINVAL ;
drivers/acpi/container.c +2 -2
@@ -52,7 +52,7 @@ MODULE_DESCRIPTION("ACPI container driveMODULE_LICENSE ("GPL" );static int acpi_container_add (struct acpi_device *device); -static int acpi_container_remove (struct acpi_device *device,int type); +static int acpi_container_remove (struct acpi_device *device);static const struct acpi_device_id container_device_ids[] = { {"ACPI0004" ,0 },
@@ -125,7 +125,7 @@ static int acpi_container_add(struct acpreturn 0 ; } -static int acpi_container_remove (struct acpi_device *device,int type) +static int acpi_container_remove (struct acpi_device *device) {acpi_status status =AE_OK ;struct acpi_container *pc =NULL ;
drivers/acpi/processor_driver.c +3 -3
@@ -81,7 +81,7 @@ MODULE_DESCRIPTION("ACPI Processor DriveMODULE_LICENSE ("GPL" );static int acpi_processor_add (struct acpi_device *device); -static int acpi_processor_remove (struct acpi_device *device,int type); +static int acpi_processor_remove (struct acpi_device *device);static void acpi_processor_notify (struct acpi_device *device,u32 event);static acpi_status acpi_processor_hotadd_init (struct acpi_processor *pr);static int acpi_processor_handle_eject (struct acpi_processor *pr);
@@ -610,7 +610,7 @@ err_free_pr:return result; } -static int acpi_processor_remove (struct acpi_device *device,int type) +static int acpi_processor_remove (struct acpi_device *device) {struct acpi_processor *pr =NULL ;
@@ -623,7 +623,7 @@ static int acpi_processor_remove(structif (pr->id >= nr_cpu_ids) goto free; -if (type ==ACPI_BUS_REMOVAL_EJECT ) { +if (device->removal_type ==ACPI_BUS_REMOVAL_EJECT ) {if (acpi_processor_handle_eject (pr))return -EINVAL ; }
drivers/acpi/scan.c +2 -3
@@ -617,8 +617,7 @@ static int acpi_device_probe(struct devi ret =acpi_device_install_notify_handler (acpi_dev);if (ret) {if (acpi_drv->ops.remove) - acpi_drv->ops.remove (acpi_dev, - acpi_dev->removal_type); + acpi_drv->ops.remove (acpi_dev);return ret; } }
@@ -640,7 +639,7 @@ static int acpi_device_remove(struct devif (acpi_drv->ops.notify)acpi_device_remove_notify_handler (acpi_dev);if (acpi_drv->ops.remove) - acpi_drv->ops.remove (acpi_dev, acpi_dev->removal_type); + acpi_drv->ops.remove (acpi_dev); } acpi_dev->driver =NULL ; acpi_dev->driver_data =NULL ;
drivers/acpi/button.c +2 -2
@@ -75,7 +75,7 @@ static const struct acpi_device_id buttoMODULE_DEVICE_TABLE (acpi, button_device_ids);static int acpi_button_add (struct acpi_device *device); -static int acpi_button_remove (struct acpi_device *device,int type); +static int acpi_button_remove (struct acpi_device *device);static void acpi_button_notify (struct acpi_device *device,u32 event);#ifdef CONFIG_PM_SLEEP
@@ -433,7 +433,7 @@ static int acpi_button_add(struct acpi_dreturn error; } -static int acpi_button_remove (struct acpi_device *device,int type) +static int acpi_button_remove (struct acpi_device *device) {struct acpi_button *button =acpi_driver_data (device);
drivers/acpi/fan.c +2 -2
@@ -45,7 +45,7 @@ MODULE_DESCRIPTION("ACPI Fan Driver");MODULE_LICENSE ("GPL" );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);static const struct acpi_device_id fan_device_ids[] = { {"PNP0C0B" ,0 },
@@ -172,7 +172,7 @@ static int acpi_fan_add(struct acpi_devireturn result; } -static int acpi_fan_remove (struct acpi_device *device,int type) +static int acpi_fan_remove (struct acpi_device *device) {struct thermal_cooling_device *cdev =acpi_driver_data (device);
drivers/acpi/sbs.c +3 -3
@@ -130,7 +130,7 @@ struct acpi_sbs {#define to_acpi_sbs (x) container_of(x, struct acpi_sbs, charger) -static int acpi_sbs_remove (struct acpi_device *device,int type); +static int acpi_sbs_remove (struct acpi_device *device);static int acpi_battery_get_state (struct acpi_battery *battery);static inline int battery_scale (int log)
@@ -949,11 +949,11 @@ static int acpi_sbs_add(struct acpi_deviacpi_smbus_register_callback (sbs->hc, acpi_sbs_callback, sbs); end:if (result) -acpi_sbs_remove (device,0 ); +acpi_sbs_remove (device);return result; } -static int acpi_sbs_remove (struct acpi_device *device,int type) +static int acpi_sbs_remove (struct acpi_device *device) {struct acpi_sbs *sbs;int id;
drivers/acpi/ac.c +2 -2
@@ -60,7 +60,7 @@ static int acpi_ac_open_fs(struct inode#endif static int acpi_ac_add (struct acpi_device *device); -static int acpi_ac_remove (struct acpi_device *device,int type); +static int acpi_ac_remove (struct acpi_device *device);static void acpi_ac_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id ac_device_ids[] = {
@@ -337,7 +337,7 @@ static int acpi_ac_resume(struct device }#endif -static int acpi_ac_remove (struct acpi_device *device,int type) +static int acpi_ac_remove (struct acpi_device *device) {struct acpi_ac *ac =NULL ;
drivers/acpi/video.c +2 -2
@@ -88,7 +88,7 @@ module_param(use_bios_initial_backlight,static int register_count =0 ;static int acpi_video_bus_add (struct acpi_device *device); -static int acpi_video_bus_remove (struct acpi_device *device,int type); +static int acpi_video_bus_remove (struct acpi_device *device);static void acpi_video_bus_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id video_device_ids[] = {
@@ -1740,7 +1740,7 @@ static int acpi_video_bus_add(struct acpreturn error; } -static int acpi_video_bus_remove (struct acpi_device *device,int type) +static int acpi_video_bus_remove (struct acpi_device *device) {struct acpi_video_bus *video =NULL ;
drivers/hwmon/acpi_power_meter.c +1 -1
@@ -911,7 +911,7 @@ exit:return res; } -static int acpi_power_meter_remove (struct acpi_device *device,int type) +static int acpi_power_meter_remove (struct acpi_device *device) {struct acpi_power_meter_resource *resource;
drivers/input/misc/atlas_btns.c +1 -1
@@ -121,7 +121,7 @@ static int atlas_acpi_button_add(structreturn err; } -static int atlas_acpi_button_remove (struct acpi_device *device,int type) +static int atlas_acpi_button_remove (struct acpi_device *device) {acpi_status status;
drivers/i2c/busses/i2c-scmi.c +1 -1
@@ -406,7 +406,7 @@ err:return -EIO ; } -static int acpi_smbus_cmi_remove (struct acpi_device *device,int type) +static int acpi_smbus_cmi_remove (struct acpi_device *device) {struct acpi_smbus_cmi *smbus_cmi =acpi_driver_data (device);
drivers/acpi/thermal.c +2 -2
@@ -97,7 +97,7 @@ module_param(psv, int, 0644);MODULE_PARM_DESC (psv,"Disable or override all passive trip points." );static int acpi_thermal_add (struct acpi_device *device); -static int acpi_thermal_remove (struct acpi_device *device,int type); +static int acpi_thermal_remove (struct acpi_device *device);static void acpi_thermal_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id thermal_device_ids[] = {
@@ -1115,7 +1115,7 @@ end:return result; } -static int acpi_thermal_remove (struct acpi_device *device,int type) +static int acpi_thermal_remove (struct acpi_device *device) {struct acpi_thermal *tz =NULL ;
drivers/acpi/battery.c +1 -1
@@ -1111,7 +1111,7 @@ fail:return result; } -static int acpi_battery_remove (struct acpi_device *device,int type) +static int acpi_battery_remove (struct acpi_device *device) {struct acpi_battery *battery =NULL ;
drivers/acpi/sbshc.c +2 -2
@@ -33,7 +33,7 @@ struct acpi_smb_hc { };static int acpi_smbus_hc_add (struct acpi_device *device); -static int acpi_smbus_hc_remove (struct acpi_device *device,int type); +static int acpi_smbus_hc_remove (struct acpi_device *device);static const struct acpi_device_id sbs_device_ids[] = { {"ACPI0001" ,0 },
@@ -296,7 +296,7 @@ static int acpi_smbus_hc_add(struct acpiextern void acpi_ec_remove_query_handler (struct acpi_ec *ec,u8 query_bit); -static int acpi_smbus_hc_remove (struct acpi_device *device,int type) +static int acpi_smbus_hc_remove (struct acpi_device *device) {struct acpi_smb_hc *hc;
drivers/acpi/hed.c +1 -1
@@ -70,7 +70,7 @@ static int acpi_hed_add(struct acpi_devireturn 0 ; } -static int acpi_hed_remove (struct acpi_device *device,int type) +static int acpi_hed_remove (struct acpi_device *device) { hed_handle =NULL ;return 0 ;
drivers/acpi/acpi_memhotplug.c +2 -2
@@ -54,7 +54,7 @@ MODULE_LICENSE("GPL");#define MEMORY_POWER_OFF_STATE 2static int acpi_memory_device_add (struct acpi_device *device); -static int acpi_memory_device_remove (struct acpi_device *device,int type); +static int acpi_memory_device_remove (struct acpi_device *device);static const struct acpi_device_id memory_device_ids[] = { {ACPI_MEMORY_DEVICE_HID ,0 },
@@ -415,7 +415,7 @@ static int acpi_memory_device_add(structreturn result; } -static int acpi_memory_device_remove (struct acpi_device *device,int type) +static int acpi_memory_device_remove (struct acpi_device *device) {struct acpi_memory_device *mem_device =NULL ;int result;
drivers/acpi/acpi_pad.c +1 -2
@@ -482,8 +482,7 @@ static int acpi_pad_add(struct acpi_devireturn 0 ; } -static int acpi_pad_remove (struct acpi_device *device, -int type) +static int acpi_pad_remove (struct acpi_device *device) {mutex_lock (&isolated_cpus_lock);acpi_pad_idle_cpus (0 );
drivers/char/sonypi.c +1 -1
@@ -1142,7 +1142,7 @@ static int sonypi_acpi_add(struct acpi_dreturn 0 ; } -static int sonypi_acpi_remove (struct acpi_device *device,int type) +static int sonypi_acpi_remove (struct acpi_device *device) { sonypi_acpi_device =NULL ;return 0 ;
drivers/hwmon/asus_atk0110.c +2 -2
@@ -190,7 +190,7 @@ struct atk_acpi_input_buf { };static int atk_add (struct acpi_device *device); -static int atk_remove (struct acpi_device *device,int type); +static int atk_remove (struct acpi_device *device);static void atk_print_sensor (struct atk_data *data,union acpi_object *obj);static int atk_read_value (struct atk_sensor_data *sensor,u64 *value);static void atk_free_sensors (struct atk_data *data);
@@ -1416,7 +1416,7 @@ out:return err; } -static int atk_remove (struct acpi_device *device,int type) +static int atk_remove (struct acpi_device *device) {struct atk_data *data = device->driver_data;dev_dbg (&device->dev,"removing...\n" );
drivers/platform/x86/asus-laptop.c +1 -1
@@ -1910,7 +1910,7 @@ fail_platform:return result; } -static int asus_acpi_remove (struct acpi_device *device,int type) +static int asus_acpi_remove (struct acpi_device *device) {struct asus_laptop *asus =acpi_driver_data (device);
drivers/platform/x86/classmate-laptop.c +4 -4
@@ -668,7 +668,7 @@ failed_file:return error; } -static int cmpc_accel_remove (struct acpi_device *acpi,int type) +static int cmpc_accel_remove (struct acpi_device *acpi) {struct input_dev *inputdev;struct cmpc_accel *accel;
@@ -753,7 +753,7 @@ static int cmpc_tablet_add(struct acpi_d cmpc_tablet_idev_init); } -static int cmpc_tablet_remove (struct acpi_device *acpi,int type) +static int cmpc_tablet_remove (struct acpi_device *acpi) {return cmpc_remove_acpi_notify_device (acpi); }
@@ -1000,7 +1000,7 @@ out_bd:return retval; } -static int cmpc_ipml_remove (struct acpi_device *acpi,int type) +static int cmpc_ipml_remove (struct acpi_device *acpi) {struct ipml200_dev *ipml;
@@ -1079,7 +1079,7 @@ static int cmpc_keys_add(struct acpi_dev cmpc_keys_idev_init); } -static int cmpc_keys_remove (struct acpi_device *acpi,int type) +static int cmpc_keys_remove (struct acpi_device *acpi) {return cmpc_remove_acpi_notify_device (acpi); }
drivers/platform/x86/eeepc-laptop.c +1 -1
@@ -1501,7 +1501,7 @@ fail_platform:return result; } -static int eeepc_acpi_remove (struct acpi_device *device,int type) +static int eeepc_acpi_remove (struct acpi_device *device) {struct eeepc_laptop *eeepc =acpi_driver_data (device);
drivers/platform/x86/fujitsu-laptop.c +2 -2
@@ -733,7 +733,7 @@ err_stop:return result; } -static int acpi_fujitsu_remove (struct acpi_device *device,int type) +static int acpi_fujitsu_remove (struct acpi_device *device) {struct fujitsu_t *fujitsu =acpi_driver_data (device);struct input_dev *input = fujitsu->input;
@@ -938,7 +938,7 @@ err_stop:return result; } -static int acpi_fujitsu_hotkey_remove (struct acpi_device *device,int type) +static int acpi_fujitsu_hotkey_remove (struct acpi_device *device) {struct fujitsu_hotkey_t *fujitsu_hotkey =acpi_driver_data (device);struct input_dev *input = fujitsu_hotkey->input;
drivers/platform/x86/fujitsu-tablet.c +1 -1
@@ -431,7 +431,7 @@ static int acpi_fujitsu_add(struct acpi_return 0 ; } -static int acpi_fujitsu_remove (struct acpi_device *adev,int type) +static int acpi_fujitsu_remove (struct acpi_device *adev) {free_irq (fujitsu.irq, fujitsu_interrupt);release_region (fujitsu.io_base, fujitsu.io_length);
drivers/platform/x86/hp_accel.c +1 -1
@@ -337,7 +337,7 @@ static int lis3lv02d_add(struct acpi_devreturn ret; } -static int lis3lv02d_remove (struct acpi_device *device,int type) +static int lis3lv02d_remove (struct acpi_device *device) {if (!device)return -EINVAL ;
drivers/platform/x86/ideapad-laptop.c +1 -1
@@ -834,7 +834,7 @@ platform_failed:return ret; } -static int ideapad_acpi_remove (struct acpi_device *adevice,int type) +static int ideapad_acpi_remove (struct acpi_device *adevice) {struct ideapad_private *priv =dev_get_drvdata (&adevice->dev);int i;
drivers/platform/x86/intel_menlow.c +1 -1
@@ -200,7 +200,7 @@ static int intel_menlow_memory_add(struc } -static int intel_menlow_memory_remove (struct acpi_device *device,int type) +static int intel_menlow_memory_remove (struct acpi_device *device) {struct thermal_cooling_device *cdev =acpi_driver_data (device);
drivers/platform/x86/panasonic-laptop.c +2 -2
@@ -176,7 +176,7 @@ enum SINF_BITS { SINF_NUM_BATTERIES = 0,/* R1 handles SINF_AC_CUR_BRIGHT as SINF_CUR_BRIGHT, doesn't know AC state */ static int acpi_pcc_hotkey_add (struct acpi_device *device); -static int acpi_pcc_hotkey_remove (struct acpi_device *device,int type); +static int acpi_pcc_hotkey_remove (struct acpi_device *device);static void acpi_pcc_hotkey_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id pcc_device_ids[] = {
@@ -663,7 +663,7 @@ static int __init acpi_pcc_init(void)return 0 ; } -static int acpi_pcc_hotkey_remove (struct acpi_device *device,int type) +static int acpi_pcc_hotkey_remove (struct acpi_device *device) {struct pcc_acpi *pcc =acpi_driver_data (device);
drivers/platform/x86/sony-laptop.c +2 -2
@@ -2740,7 +2740,7 @@ outwalk:return result; } -static int sony_nc_remove (struct acpi_device *device,int type) +static int sony_nc_remove (struct acpi_device *device) {struct sony_nc_value *item;
@@ -4111,7 +4111,7 @@ found:* ACPI driver * *****************/ -static int sony_pic_remove (struct acpi_device *device,int type) +static int sony_pic_remove (struct acpi_device *device) {struct sony_pic_ioport *io, *tmp_io;struct sony_pic_irq *irq, *tmp_irq;
drivers/platform/x86/topstar-laptop.c +1 -1
@@ -157,7 +157,7 @@ add_err:return -ENODEV ; } -static int acpi_topstar_remove (struct acpi_device *device,int type) +static int acpi_topstar_remove (struct acpi_device *device) {struct topstar_hkey *tps_hkey =acpi_driver_data (device);
drivers/platform/x86/toshiba_acpi.c +2 -2
@@ -1118,7 +1118,7 @@ static int toshiba_acpi_setup_backlight(return 0 ; } -static int toshiba_acpi_remove (struct acpi_device *acpi_dev,int type) +static int toshiba_acpi_remove (struct acpi_device *acpi_dev) {struct toshiba_acpi_dev *dev =acpi_driver_data (acpi_dev);
@@ -1250,7 +1250,7 @@ static int toshiba_acpi_add(struct acpi_return 0 ; error: -toshiba_acpi_remove (acpi_dev,0 ); +toshiba_acpi_remove (acpi_dev);return ret; }
drivers/platform/x86/toshiba_bluetooth.c +2 -2
@@ -32,7 +32,7 @@ MODULE_LICENSE("GPL");static int toshiba_bt_rfkill_add (struct acpi_device *device); -static int toshiba_bt_rfkill_remove (struct acpi_device *device,int type); +static int toshiba_bt_rfkill_remove (struct acpi_device *device);static void toshiba_bt_rfkill_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id bt_device_ids[] = {
@@ -122,7 +122,7 @@ static int toshiba_bt_rfkill_add(structreturn result; } -static int toshiba_bt_rfkill_remove (struct acpi_device *device,int type) +static int toshiba_bt_rfkill_remove (struct acpi_device *device) {/* clean up */ return 0 ;
drivers/platform/x86/wmi.c +2 -2
@@ -92,7 +92,7 @@ module_param(debug_dump_wdg, bool, 0444)MODULE_PARM_DESC (debug_dump_wdg,"Dump available WMI interfaces [0/1]" ); -static int acpi_wmi_remove (struct acpi_device *device,int type); +static int acpi_wmi_remove (struct acpi_device *device);static int acpi_wmi_add (struct acpi_device *device);static void acpi_wmi_notify (struct acpi_device *device,u32 event);
@@ -917,7 +917,7 @@ static void acpi_wmi_notify(struct acpi_ } } -static int acpi_wmi_remove (struct acpi_device *device,int type) +static int acpi_wmi_remove (struct acpi_device *device) {acpi_remove_address_space_handler (device->handle,ACPI_ADR_SPACE_EC , &acpi_wmi_ec_space_handler);
drivers/platform/x86/xo15-ebook.c +1 -1
@@ -150,7 +150,7 @@ static int ebook_switch_add(struct acpi_return error; } -static int ebook_switch_remove (struct acpi_device *device,int type) +static int ebook_switch_remove (struct acpi_device *device) {struct ebook_switch *button =acpi_driver_data (device);
drivers/staging/quickstart/quickstart.c +1 -1
@@ -296,7 +296,7 @@ fail_config:return ret; } -static int quickstart_acpi_remove (struct acpi_device *device,int type) +static int quickstart_acpi_remove (struct acpi_device *device) {acpi_status status;struct quickstart_acpi *quickstart;
drivers/video/backlight/apple_bl.c +1 -1
@@ -196,7 +196,7 @@ static int apple_bl_add(struct acpi_devireturn 0 ; } -static int apple_bl_remove (struct acpi_device *dev,int type) +static int apple_bl_remove (struct acpi_device *dev) {backlight_device_unregister (apple_backlight_device);
drivers/xen/xen-acpi-pad.c +1 -2
@@ -140,8 +140,7 @@ static int acpi_pad_add(struct acpi_devireturn 0 ; } -static int acpi_pad_remove (struct acpi_device *device, -int type) +static int acpi_pad_remove (struct acpi_device *device) {mutex_lock (&xen_cpu_lock);xen_acpi_pad_idle_cpus (0 );
Quoted 9 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
The second argument of ACPI driver .remove() operation is only used by the ACPI processor driver and the value passed to that driver through it is always available from the given struct
acpi_deviceobject'sremoval_typefield. For this reason, the second ACPI driver .remove() argument is in fact useless, so drop it.Signed-off-by Rafael J. Wysocki <[email protected]>
Forgot to say: This is on top of the linux-next branch of the linux-pm.git tree.
Thanks,
Rafael
Quoted 820 lines
--- drivers/acpi/ac.c | 4 ++-- drivers/acpi/acpi_memhotplug.c | 4 ++-- drivers/acpi/acpi_pad.c | 3 +-- drivers/acpi/battery.c | 2 +- drivers/acpi/button.c | 4 ++-- drivers/acpi/container.c | 4 ++-- drivers/acpi/ec.c | 2 +- drivers/acpi/fan.c | 4 ++-- drivers/acpi/hed.c | 2 +- drivers/acpi/pci_link.c | 4 ++-- drivers/acpi/pci_root.c | 4 ++-- drivers/acpi/processor_driver.c | 6 +++--- drivers/acpi/sbs.c | 6 +++--- drivers/acpi/sbshc.c | 4 ++-- drivers/acpi/scan.c | 5 ++--- drivers/acpi/thermal.c | 4 ++-- drivers/acpi/video.c | 4 ++-- drivers/char/hpet.c | 2 +- drivers/char/sonypi.c | 2 +- drivers/hwmon/acpi_power_meter.c | 2 +- drivers/hwmon/asus_atk0110.c | 4 ++-- drivers/i2c/busses/i2c-scmi.c | 2 +- drivers/input/misc/atlas_btns.c | 2 +- drivers/platform/x86/asus-laptop.c | 2 +- drivers/platform/x86/classmate-laptop.c | 8 ++++---- drivers/platform/x86/eeepc-laptop.c | 2 +- drivers/platform/x86/fujitsu-laptop.c | 4 ++-- drivers/platform/x86/fujitsu-tablet.c | 2 +- drivers/platform/x86/hp_accel.c | 2 +- drivers/platform/x86/ideapad-laptop.c | 2 +- drivers/platform/x86/intel_menlow.c | 2 +- drivers/platform/x86/panasonic-laptop.c | 4 ++-- drivers/platform/x86/sony-laptop.c | 4 ++-- drivers/platform/x86/topstar-laptop.c | 2 +- drivers/platform/x86/toshiba_acpi.c | 4 ++-- drivers/platform/x86/toshiba_bluetooth.c | 4 ++-- drivers/platform/x86/wmi.c | 4 ++-- drivers/platform/x86/xo15-ebook.c | 2 +- drivers/staging/quickstart/quickstart.c | 2 +- drivers/video/backlight/apple_bl.c | 2 +- drivers/xen/xen-acpi-pad.c | 3 +-- include/acpi/acpi_bus.h | 2 +- 42 files changed, 67 insertions(+), 70 deletions(-)Index:
linux-pm/include/acpi/acpi_bus.h
===================================================================include/acpi/acpi_bus.h +1
-1@@ -89,7 +89,7 @@ struct acpi_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);typedef int (*acpi_op_start ) (struct acpi_device * device);typedef void (*acpi_op_notify ) (struct acpi_device * device,u32 event);Index:
linux-pm/drivers/acpi/ec.c
===================================================================drivers/acpi/ec.c +1
-1@@ -852,7 +852,7 @@ static int acpi_ec_add(struct acpi_devicreturn ret; } -static int acpi_ec_remove (struct acpi_device *device,int type) +static int acpi_ec_remove (struct acpi_device *device) {struct acpi_ec *ec;struct acpi_ec_query_handler *handler, *tmp;Index:
linux-pm/drivers/acpi/pci_root.c
===================================================================drivers/acpi/pci_root.c +2
-2@@ -46,7 +46,7 @@ ACPI_MODULE_NAME("pci_root");#define ACPI_PCI_ROOT_CLASS "pci_bridge"#define ACPI_PCI_ROOT_DEVICE_NAME "PCI Root Bridge"static int acpi_pci_root_add (struct acpi_device *device); -static int acpi_pci_root_remove (struct acpi_device *device,int type); +static int acpi_pci_root_remove (struct acpi_device *device);#define ACPI_PCIE_REQ_SUPPORT (OSC_EXT_PCI_CONFIG_SUPPORT \ | OSC_ACTIVE_STATE_PWR_SUPPORT \@@ -609,7 +609,7 @@ end:return result; } -static int acpi_pci_root_remove (struct acpi_device *device,int type) +static int acpi_pci_root_remove (struct acpi_device *device) {acpi_status status;acpi_handle handle;Index:
linux-pm/drivers/acpi/pci_link.c
===================================================================drivers/acpi/pci_link.c +2
-2@@ -54,7 +54,7 @@ ACPI_MODULE_NAME("pci_link");#define ACPI_PCI_LINK_MAX_POSSIBLE 16static int acpi_pci_link_add (struct acpi_device *device); -static int acpi_pci_link_remove (struct acpi_device *device,int type); +static int acpi_pci_link_remove (struct acpi_device *device);static const struct acpi_device_id link_device_ids[] = { {"PNP0C0F" ,0 },@@ -766,7 +766,7 @@ static void irqrouter_resume(void) } } -static int acpi_pci_link_remove (struct acpi_device *device,int type) +static int acpi_pci_link_remove (struct acpi_device *device) {struct acpi_pci_link *link;Index:
linux-pm/drivers/char/hpet.c
===================================================================drivers/char/hpet.c +1
-1@@ -1041,7 +1041,7 @@ static int hpet_acpi_add(struct acpi_devreturn hpet_alloc (&data); } -static int hpet_acpi_remove (struct acpi_device *device,int type) +static int hpet_acpi_remove (struct acpi_device *device) {/* XXX need to unregister clocksource, dealloc mem, etc */ return -EINVAL ;Index:
linux-pm/drivers/acpi/container.c
===================================================================drivers/acpi/container.c +2
-2@@ -52,7 +52,7 @@ MODULE_DESCRIPTION("ACPI container driveMODULE_LICENSE ("GPL" );static int acpi_container_add (struct acpi_device *device); -static int acpi_container_remove (struct acpi_device *device,int type); +static int acpi_container_remove (struct acpi_device *device);static const struct acpi_device_id container_device_ids[] = { {"ACPI0004" ,0 },@@ -125,7 +125,7 @@ static int acpi_container_add(struct acpreturn 0 ; } -static int acpi_container_remove (struct acpi_device *device,int type) +static int acpi_container_remove (struct acpi_device *device) {acpi_status status =AE_OK ;struct acpi_container *pc =NULL ;Index:
linux-pm/drivers/acpi/processor_driver.c
===================================================================drivers/acpi/processor_driver.c +3
-3@@ -81,7 +81,7 @@ MODULE_DESCRIPTION("ACPI Processor DriveMODULE_LICENSE ("GPL" );static int acpi_processor_add (struct acpi_device *device); -static int acpi_processor_remove (struct acpi_device *device,int type); +static int acpi_processor_remove (struct acpi_device *device);static void acpi_processor_notify (struct acpi_device *device,u32 event);static acpi_status acpi_processor_hotadd_init (struct acpi_processor *pr);static int acpi_processor_handle_eject (struct acpi_processor *pr);@@ -610,7 +610,7 @@ err_free_pr:return result; } -static int acpi_processor_remove (struct acpi_device *device,int type) +static int acpi_processor_remove (struct acpi_device *device) {struct acpi_processor *pr =NULL ;@@ -623,7 +623,7 @@ static int acpi_processor_remove(structif (pr->id >= nr_cpu_ids) goto free; -if (type ==ACPI_BUS_REMOVAL_EJECT ) { +if (device->removal_type ==ACPI_BUS_REMOVAL_EJECT ) {if (acpi_processor_handle_eject (pr))return -EINVAL ; }Index:
linux-pm/drivers/acpi/scan.c
===================================================================drivers/acpi/scan.c +2
-3@@ -617,8 +617,7 @@ static int acpi_device_probe(struct devi ret =acpi_device_install_notify_handler (acpi_dev);if (ret) {if (acpi_drv->ops.remove) - acpi_drv->ops.remove (acpi_dev, - acpi_dev->removal_type); + acpi_drv->ops.remove (acpi_dev);return ret; } }@@ -640,7 +639,7 @@ static int acpi_device_remove(struct devif (acpi_drv->ops.notify)acpi_device_remove_notify_handler (acpi_dev);if (acpi_drv->ops.remove) - acpi_drv->ops.remove (acpi_dev, acpi_dev->removal_type); + acpi_drv->ops.remove (acpi_dev); } acpi_dev->driver =NULL ; acpi_dev->driver_data =NULL ;Index:
linux-pm/drivers/acpi/button.c
===================================================================drivers/acpi/button.c +2
-2@@ -75,7 +75,7 @@ static const struct acpi_device_id buttoMODULE_DEVICE_TABLE (acpi, button_device_ids);static int acpi_button_add (struct acpi_device *device); -static int acpi_button_remove (struct acpi_device *device,int type); +static int acpi_button_remove (struct acpi_device *device);static void acpi_button_notify (struct acpi_device *device,u32 event);#ifdef CONFIG_PM_SLEEP @@ -433,7 +433,7 @@ static int acpi_button_add(struct acpi_dreturn error; } -static int acpi_button_remove (struct acpi_device *device,int type) +static int acpi_button_remove (struct acpi_device *device) {struct acpi_button *button =acpi_driver_data (device);Index:
linux-pm/drivers/acpi/fan.c
===================================================================drivers/acpi/fan.c +2
-2@@ -45,7 +45,7 @@ MODULE_DESCRIPTION("ACPI Fan Driver");MODULE_LICENSE ("GPL" );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);static const struct acpi_device_id fan_device_ids[] = { {"PNP0C0B" ,0 },@@ -172,7 +172,7 @@ static int acpi_fan_add(struct acpi_devireturn result; } -static int acpi_fan_remove (struct acpi_device *device,int type) +static int acpi_fan_remove (struct acpi_device *device) {struct thermal_cooling_device *cdev =acpi_driver_data (device);Index:
linux-pm/drivers/acpi/sbs.c
===================================================================drivers/acpi/sbs.c +3
-3@@ -130,7 +130,7 @@ struct acpi_sbs {#define to_acpi_sbs (x) container_of(x, struct acpi_sbs, charger) -static int acpi_sbs_remove (struct acpi_device *device,int type); +static int acpi_sbs_remove (struct acpi_device *device);static int acpi_battery_get_state (struct acpi_battery *battery);static inline int battery_scale (int log)@@ -949,11 +949,11 @@ static int acpi_sbs_add(struct acpi_deviacpi_smbus_register_callback (sbs->hc, acpi_sbs_callback, sbs); end:if (result) -acpi_sbs_remove (device,0 ); +acpi_sbs_remove (device);return result; } -static int acpi_sbs_remove (struct acpi_device *device,int type) +static int acpi_sbs_remove (struct acpi_device *device) {struct acpi_sbs *sbs;int id;Index:
linux-pm/drivers/acpi/ac.c
===================================================================drivers/acpi/ac.c +2
-2@@ -60,7 +60,7 @@ static int acpi_ac_open_fs(struct inode#endif static int acpi_ac_add (struct acpi_device *device); -static int acpi_ac_remove (struct acpi_device *device,int type); +static int acpi_ac_remove (struct acpi_device *device);static void acpi_ac_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id ac_device_ids[] = {@@ -337,7 +337,7 @@ static int acpi_ac_resume(struct device }#endif -static int acpi_ac_remove (struct acpi_device *device,int type) +static int acpi_ac_remove (struct acpi_device *device) {struct acpi_ac *ac =NULL ;Index:
linux-pm/drivers/acpi/video.c
===================================================================drivers/acpi/video.c +2
-2@@ -88,7 +88,7 @@ module_param(use_bios_initial_backlight,static int register_count =0 ;static int acpi_video_bus_add (struct acpi_device *device); -static int acpi_video_bus_remove (struct acpi_device *device,int type); +static int acpi_video_bus_remove (struct acpi_device *device);static void acpi_video_bus_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id video_device_ids[] = {@@ -1740,7 +1740,7 @@ static int acpi_video_bus_add(struct acpreturn error; } -static int acpi_video_bus_remove (struct acpi_device *device,int type) +static int acpi_video_bus_remove (struct acpi_device *device) {struct acpi_video_bus *video =NULL ;Index:
linux-pm/drivers/hwmon/acpi_power_meter.c
===================================================================drivers/hwmon/acpi_power_meter.c +1
-1@@ -911,7 +911,7 @@ exit:return res; } -static int acpi_power_meter_remove (struct acpi_device *device,int type) +static int acpi_power_meter_remove (struct acpi_device *device) {struct acpi_power_meter_resource *resource;Index:
linux-pm/drivers/input/misc/atlas_btns.c
===================================================================drivers/input/misc/atlas_btns.c +1
-1@@ -121,7 +121,7 @@ static int atlas_acpi_button_add(structreturn err; } -static int atlas_acpi_button_remove (struct acpi_device *device,int type) +static int atlas_acpi_button_remove (struct acpi_device *device) {acpi_status status;Index:
linux-pm/drivers/i2c/busses/i2c-scmi.c
===================================================================drivers/i2c/busses/i2c-scmi.c +1
-1@@ -406,7 +406,7 @@ err:return -EIO ; } -static int acpi_smbus_cmi_remove (struct acpi_device *device,int type) +static int acpi_smbus_cmi_remove (struct acpi_device *device) {struct acpi_smbus_cmi *smbus_cmi =acpi_driver_data (device);Index:
linux-pm/drivers/acpi/thermal.c
===================================================================drivers/acpi/thermal.c +2
-2@@ -97,7 +97,7 @@ module_param(psv, int, 0644);MODULE_PARM_DESC (psv,"Disable or override all passive trip points." );static int acpi_thermal_add (struct acpi_device *device); -static int acpi_thermal_remove (struct acpi_device *device,int type); +static int acpi_thermal_remove (struct acpi_device *device);static void acpi_thermal_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id thermal_device_ids[] = {@@ -1115,7 +1115,7 @@ end:return result; } -static int acpi_thermal_remove (struct acpi_device *device,int type) +static int acpi_thermal_remove (struct acpi_device *device) {struct acpi_thermal *tz =NULL ;Index:
linux-pm/drivers/acpi/battery.c
===================================================================drivers/acpi/battery.c +1
-1@@ -1111,7 +1111,7 @@ fail:return result; } -static int acpi_battery_remove (struct acpi_device *device,int type) +static int acpi_battery_remove (struct acpi_device *device) {struct acpi_battery *battery =NULL ;Index:
linux-pm/drivers/acpi/sbshc.c
===================================================================drivers/acpi/sbshc.c +2
-2@@ -33,7 +33,7 @@ struct acpi_smb_hc { };static int acpi_smbus_hc_add (struct acpi_device *device); -static int acpi_smbus_hc_remove (struct acpi_device *device,int type); +static int acpi_smbus_hc_remove (struct acpi_device *device);static const struct acpi_device_id sbs_device_ids[] = { {"ACPI0001" ,0 },@@ -296,7 +296,7 @@ static int acpi_smbus_hc_add(struct acpiextern void acpi_ec_remove_query_handler (struct acpi_ec *ec,u8 query_bit); -static int acpi_smbus_hc_remove (struct acpi_device *device,int type) +static int acpi_smbus_hc_remove (struct acpi_device *device) {struct acpi_smb_hc *hc;Index:
linux-pm/drivers/acpi/hed.c
===================================================================drivers/acpi/hed.c +1
-1@@ -70,7 +70,7 @@ static int acpi_hed_add(struct acpi_devireturn 0 ; } -static int acpi_hed_remove (struct acpi_device *device,int type) +static int acpi_hed_remove (struct acpi_device *device) { hed_handle =NULL ;return 0 ;Index:
linux-pm/drivers/acpi/acpi_memhotplug.c
===================================================================drivers/acpi/acpi_memhotplug.c +2
-2@@ -54,7 +54,7 @@ MODULE_LICENSE("GPL");#define MEMORY_POWER_OFF_STATE 2static int acpi_memory_device_add (struct acpi_device *device); -static int acpi_memory_device_remove (struct acpi_device *device,int type); +static int acpi_memory_device_remove (struct acpi_device *device);static const struct acpi_device_id memory_device_ids[] = { {ACPI_MEMORY_DEVICE_HID ,0 },@@ -415,7 +415,7 @@ static int acpi_memory_device_add(structreturn result; } -static int acpi_memory_device_remove (struct acpi_device *device,int type) +static int acpi_memory_device_remove (struct acpi_device *device) {struct acpi_memory_device *mem_device =NULL ;int result;Index:
linux-pm/drivers/acpi/acpi_pad.c
===================================================================drivers/acpi/acpi_pad.c +1
-2@@ -482,8 +482,7 @@ static int acpi_pad_add(struct acpi_devireturn 0 ; } -static int acpi_pad_remove (struct acpi_device *device, -int type) +static int acpi_pad_remove (struct acpi_device *device) {mutex_lock (&isolated_cpus_lock);acpi_pad_idle_cpus (0 );Index:
linux-pm/drivers/char/sonypi.c
===================================================================drivers/char/sonypi.c +1
-1@@ -1142,7 +1142,7 @@ static int sonypi_acpi_add(struct acpi_dreturn 0 ; } -static int sonypi_acpi_remove (struct acpi_device *device,int type) +static int sonypi_acpi_remove (struct acpi_device *device) { sonypi_acpi_device =NULL ;return 0 ;Index:
linux-pm/drivers/hwmon/asus_atk0110.c
===================================================================drivers/hwmon/asus_atk0110.c +2
-2@@ -190,7 +190,7 @@ struct atk_acpi_input_buf { };static int atk_add (struct acpi_device *device); -static int atk_remove (struct acpi_device *device,int type); +static int atk_remove (struct acpi_device *device);static void atk_print_sensor (struct atk_data *data,union acpi_object *obj);static int atk_read_value (struct atk_sensor_data *sensor,u64 *value);static void atk_free_sensors (struct atk_data *data);@@ -1416,7 +1416,7 @@ out:return err; } -static int atk_remove (struct acpi_device *device,int type) +static int atk_remove (struct acpi_device *device) {struct atk_data *data = device->driver_data;dev_dbg (&device->dev,"removing...\n" );Index:
linux-pm/drivers/platform/x86/asus-laptop.c
===================================================================drivers/platform/x86/asus-laptop.c +1
-1@@ -1910,7 +1910,7 @@ fail_platform:return result; } -static int asus_acpi_remove (struct acpi_device *device,int type) +static int asus_acpi_remove (struct acpi_device *device) {struct asus_laptop *asus =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/classmate-laptop.c
===================================================================drivers/platform/x86/classmate-laptop.c +4
-4@@ -668,7 +668,7 @@ failed_file:return error; } -static int cmpc_accel_remove (struct acpi_device *acpi,int type) +static int cmpc_accel_remove (struct acpi_device *acpi) {struct input_dev *inputdev;struct cmpc_accel *accel;@@ -753,7 +753,7 @@ static int cmpc_tablet_add(struct acpi_d cmpc_tablet_idev_init); } -static int cmpc_tablet_remove (struct acpi_device *acpi,int type) +static int cmpc_tablet_remove (struct acpi_device *acpi) {return cmpc_remove_acpi_notify_device (acpi); }@@ -1000,7 +1000,7 @@ out_bd:return retval; } -static int cmpc_ipml_remove (struct acpi_device *acpi,int type) +static int cmpc_ipml_remove (struct acpi_device *acpi) {struct ipml200_dev *ipml;@@ -1079,7 +1079,7 @@ static int cmpc_keys_add(struct acpi_dev cmpc_keys_idev_init); } -static int cmpc_keys_remove (struct acpi_device *acpi,int type) +static int cmpc_keys_remove (struct acpi_device *acpi) {return cmpc_remove_acpi_notify_device (acpi); }Index:
linux-pm/drivers/platform/x86/eeepc-laptop.c
===================================================================drivers/platform/x86/eeepc-laptop.c +1
-1@@ -1501,7 +1501,7 @@ fail_platform:return result; } -static int eeepc_acpi_remove (struct acpi_device *device,int type) +static int eeepc_acpi_remove (struct acpi_device *device) {struct eeepc_laptop *eeepc =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/fujitsu-laptop.c
===================================================================drivers/platform/x86/fujitsu-laptop.c +2
-2@@ -733,7 +733,7 @@ err_stop:return result; } -static int acpi_fujitsu_remove (struct acpi_device *device,int type) +static int acpi_fujitsu_remove (struct acpi_device *device) {struct fujitsu_t *fujitsu =acpi_driver_data (device);struct input_dev *input = fujitsu->input;@@ -938,7 +938,7 @@ err_stop:return result; } -static int acpi_fujitsu_hotkey_remove (struct acpi_device *device,int type) +static int acpi_fujitsu_hotkey_remove (struct acpi_device *device) {struct fujitsu_hotkey_t *fujitsu_hotkey =acpi_driver_data (device);struct input_dev *input = fujitsu_hotkey->input;Index:
linux-pm/drivers/platform/x86/fujitsu-tablet.c
===================================================================drivers/platform/x86/fujitsu-tablet.c +1
-1@@ -431,7 +431,7 @@ static int acpi_fujitsu_add(struct acpi_return 0 ; } -static int acpi_fujitsu_remove (struct acpi_device *adev,int type) +static int acpi_fujitsu_remove (struct acpi_device *adev) {free_irq (fujitsu.irq, fujitsu_interrupt);release_region (fujitsu.io_base, fujitsu.io_length);Index:
linux-pm/drivers/platform/x86/hp_accel.c
===================================================================drivers/platform/x86/hp_accel.c +1
-1@@ -337,7 +337,7 @@ static int lis3lv02d_add(struct acpi_devreturn ret; } -static int lis3lv02d_remove (struct acpi_device *device,int type) +static int lis3lv02d_remove (struct acpi_device *device) {if (!device)return -EINVAL ;Index:
linux-pm/drivers/platform/x86/ideapad-laptop.c
===================================================================drivers/platform/x86/ideapad-laptop.c +1
-1@@ -834,7 +834,7 @@ platform_failed:return ret; } -static int ideapad_acpi_remove (struct acpi_device *adevice,int type) +static int ideapad_acpi_remove (struct acpi_device *adevice) {struct ideapad_private *priv =dev_get_drvdata (&adevice->dev);int i;Index:
linux-pm/drivers/platform/x86/intel_menlow.c
===================================================================drivers/platform/x86/intel_menlow.c +1
-1@@ -200,7 +200,7 @@ static int intel_menlow_memory_add(struc } -static int intel_menlow_memory_remove (struct acpi_device *device,int type) +static int intel_menlow_memory_remove (struct acpi_device *device) {struct thermal_cooling_device *cdev =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/panasonic-laptop.c
===================================================================drivers/platform/x86/panasonic-laptop.c +2
-2@@ -176,7 +176,7 @@ enum SINF_BITS { SINF_NUM_BATTERIES = 0,/* R1 handles SINF_AC_CUR_BRIGHT as SINF_CUR_BRIGHT, doesn't know AC state */ static int acpi_pcc_hotkey_add (struct acpi_device *device); -static int acpi_pcc_hotkey_remove (struct acpi_device *device,int type); +static int acpi_pcc_hotkey_remove (struct acpi_device *device);static void acpi_pcc_hotkey_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id pcc_device_ids[] = {@@ -663,7 +663,7 @@ static int __init acpi_pcc_init(void)return 0 ; } -static int acpi_pcc_hotkey_remove (struct acpi_device *device,int type) +static int acpi_pcc_hotkey_remove (struct acpi_device *device) {struct pcc_acpi *pcc =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/sony-laptop.c
===================================================================drivers/platform/x86/sony-laptop.c +2
-2@@ -2740,7 +2740,7 @@ outwalk:return result; } -static int sony_nc_remove (struct acpi_device *device,int type) +static int sony_nc_remove (struct acpi_device *device) {struct sony_nc_value *item;@@ -4111,7 +4111,7 @@ found:* ACPI driver * *****************/ -static int sony_pic_remove (struct acpi_device *device,int type) +static int sony_pic_remove (struct acpi_device *device) {struct sony_pic_ioport *io, *tmp_io;struct sony_pic_irq *irq, *tmp_irq;Index:
linux-pm/drivers/platform/x86/topstar-laptop.c
===================================================================drivers/platform/x86/topstar-laptop.c +1
-1@@ -157,7 +157,7 @@ add_err:return -ENODEV ; } -static int acpi_topstar_remove (struct acpi_device *device,int type) +static int acpi_topstar_remove (struct acpi_device *device) {struct topstar_hkey *tps_hkey =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/toshiba_acpi.c
===================================================================drivers/platform/x86/toshiba_acpi.c +2
-2@@ -1118,7 +1118,7 @@ static int toshiba_acpi_setup_backlight(return 0 ; } -static int toshiba_acpi_remove (struct acpi_device *acpi_dev,int type) +static int toshiba_acpi_remove (struct acpi_device *acpi_dev) {struct toshiba_acpi_dev *dev =acpi_driver_data (acpi_dev);@@ -1250,7 +1250,7 @@ static int toshiba_acpi_add(struct acpi_return 0 ; error: -toshiba_acpi_remove (acpi_dev,0 ); +toshiba_acpi_remove (acpi_dev);return ret; }Index:
linux-pm/drivers/platform/x86/toshiba_bluetooth.c
===================================================================drivers/platform/x86/toshiba_bluetooth.c +2
-2@@ -32,7 +32,7 @@ MODULE_LICENSE("GPL");static int toshiba_bt_rfkill_add (struct acpi_device *device); -static int toshiba_bt_rfkill_remove (struct acpi_device *device,int type); +static int toshiba_bt_rfkill_remove (struct acpi_device *device);static void toshiba_bt_rfkill_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id bt_device_ids[] = {@@ -122,7 +122,7 @@ static int toshiba_bt_rfkill_add(structreturn result; } -static int toshiba_bt_rfkill_remove (struct acpi_device *device,int type) +static int toshiba_bt_rfkill_remove (struct acpi_device *device) {/* clean up */ return 0 ;Index:
linux-pm/drivers/platform/x86/wmi.c
===================================================================drivers/platform/x86/wmi.c +2
-2@@ -92,7 +92,7 @@ module_param(debug_dump_wdg, bool, 0444)MODULE_PARM_DESC (debug_dump_wdg,"Dump available WMI interfaces [0/1]" ); -static int acpi_wmi_remove (struct acpi_device *device,int type); +static int acpi_wmi_remove (struct acpi_device *device);static int acpi_wmi_add (struct acpi_device *device);static void acpi_wmi_notify (struct acpi_device *device,u32 event);@@ -917,7 +917,7 @@ static void acpi_wmi_notify(struct acpi_ } } -static int acpi_wmi_remove (struct acpi_device *device,int type) +static int acpi_wmi_remove (struct acpi_device *device) {acpi_remove_address_space_handler (device->handle,ACPI_ADR_SPACE_EC , &acpi_wmi_ec_space_handler);Index:
linux-pm/drivers/platform/x86/xo15-ebook.c
===================================================================drivers/platform/x86/xo15-ebook.c +1
-1@@ -150,7 +150,7 @@ static int ebook_switch_add(struct acpi_return error; } -static int ebook_switch_remove (struct acpi_device *device,int type) +static int ebook_switch_remove (struct acpi_device *device) {struct ebook_switch *button =acpi_driver_data (device);Index:
linux-pm/drivers/staging/quickstart/quickstart.c
===================================================================drivers/staging/quickstart/quickstart.c +1
-1@@ -296,7 +296,7 @@ fail_config:return ret; } -static int quickstart_acpi_remove (struct acpi_device *device,int type) +static int quickstart_acpi_remove (struct acpi_device *device) {acpi_status status;struct quickstart_acpi *quickstart;Index:
linux-pm/drivers/video/backlight/apple_bl.c
===================================================================drivers/video/backlight/apple_bl.c +1
-1@@ -196,7 +196,7 @@ static int apple_bl_add(struct acpi_devireturn 0 ; } -static int apple_bl_remove (struct acpi_device *dev,int type) +static int apple_bl_remove (struct acpi_device *dev) {backlight_device_unregister (apple_backlight_device);Index:
linux-pm/drivers/xen/xen-acpi-pad.c
===================================================================drivers/xen/xen-acpi-pad.c +1
-3@@ -140,8 +140,7 @@ static int acpi_pad_add(struct acpi_devireturn 0 ; } -static int acpi_pad_remove (struct acpi_device *device, -int type) +static int acpi_pad_remove (struct acpi_device *device) {mutex_lock (&xen_cpu_lock);xen_acpi_pad_idle_cpus (0 ); --To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
Yinghai Lu
Acked-byQuoted 69 lines · Rafael J. Wysocki
Quoted 9 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
The second argument of ACPI driver .remove() operation is only used by the ACPI processor driver and the value passed to that driver through it is always available from the given struct
acpi_deviceobject'sremoval_typefield. For this reason, the second ACPI driver .remove() argument is in fact useless, so drop it.Signed-off-by Rafael J. Wysocki <[email protected]>Forgot to say: This is on top of the linux-next branch of the linux-pm.git tree.
Thanks,
RafaelQuoted 52 lines
--- drivers/acpi/ac.c | 4 ++-- drivers/acpi/acpi_memhotplug.c | 4 ++-- drivers/acpi/acpi_pad.c | 3 +-- drivers/acpi/battery.c | 2 +- drivers/acpi/button.c | 4 ++-- drivers/acpi/container.c | 4 ++-- drivers/acpi/ec.c | 2 +- drivers/acpi/fan.c | 4 ++-- drivers/acpi/hed.c | 2 +- drivers/acpi/pci_link.c | 4 ++-- drivers/acpi/pci_root.c | 4 ++-- drivers/acpi/processor_driver.c | 6 +++--- drivers/acpi/sbs.c | 6 +++--- drivers/acpi/sbshc.c | 4 ++-- drivers/acpi/scan.c | 5 ++--- drivers/acpi/thermal.c | 4 ++-- drivers/acpi/video.c | 4 ++-- drivers/char/hpet.c | 2 +- drivers/char/sonypi.c | 2 +- drivers/hwmon/acpi_power_meter.c | 2 +- drivers/hwmon/asus_atk0110.c | 4 ++-- drivers/i2c/busses/i2c-scmi.c | 2 +- drivers/input/misc/atlas_btns.c | 2 +- drivers/platform/x86/asus-laptop.c | 2 +- drivers/platform/x86/classmate-laptop.c | 8 ++++---- drivers/platform/x86/eeepc-laptop.c | 2 +- drivers/platform/x86/fujitsu-laptop.c | 4 ++-- drivers/platform/x86/fujitsu-tablet.c | 2 +- drivers/platform/x86/hp_accel.c | 2 +- drivers/platform/x86/ideapad-laptop.c | 2 +- drivers/platform/x86/intel_menlow.c | 2 +- drivers/platform/x86/panasonic-laptop.c | 4 ++-- drivers/platform/x86/sony-laptop.c | 4 ++-- drivers/platform/x86/topstar-laptop.c | 2 +- drivers/platform/x86/toshiba_acpi.c | 4 ++-- drivers/platform/x86/toshiba_bluetooth.c | 4 ++-- drivers/platform/x86/wmi.c | 4 ++-- drivers/platform/x86/xo15-ebook.c | 2 +- drivers/staging/quickstart/quickstart.c | 2 +- drivers/video/backlight/apple_bl.c | 2 +- drivers/xen/xen-acpi-pad.c | 3 +-- include/acpi/acpi_bus.h | 2 +- 42 files changed, 67 insertions(+), 70 deletions(-)Index:
linux-pm/include/acpi/acpi_bus.h
===================================================================include/acpi/acpi_bus.h +0
-0@@ -89,7 +89,7 @@ struct acpi_device;*/
Quoted 5 lines
include/acpi/acpi_bus.h struct acpi_device; · line 94
Quoted 5 lines
include/acpi/acpi_bus.h +1
-1typedef 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);typedef int (*acpi_op_start ) (struct acpi_device * device);typedef void (*acpi_op_notify ) (struct acpi_device * device,u32 event);
Also can you remove acpi_op_start ? there is no user with it.
Yinghai
Quoted 70 lines · Yinghai Lu
Quoted 69 lines · Rafael J. Wysocki
Quoted 9 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
The second argument of ACPI driver .remove() operation is only used by the ACPI processor driver and the value passed to that driver through it is always available from the given struct
acpi_deviceobject'sremoval_typefield. For this reason, the second ACPI driver .remove() argument is in fact useless, so drop it.Signed-off-by Rafael J. Wysocki <[email protected]>Forgot to say: This is on top of the linux-next branch of the linux-pm.git tree.
Thanks,
RafaelQuoted 52 lines
--- drivers/acpi/ac.c | 4 ++-- drivers/acpi/acpi_memhotplug.c | 4 ++-- drivers/acpi/acpi_pad.c | 3 +-- drivers/acpi/battery.c | 2 +- drivers/acpi/button.c | 4 ++-- drivers/acpi/container.c | 4 ++-- drivers/acpi/ec.c | 2 +- drivers/acpi/fan.c | 4 ++-- drivers/acpi/hed.c | 2 +- drivers/acpi/pci_link.c | 4 ++-- drivers/acpi/pci_root.c | 4 ++-- drivers/acpi/processor_driver.c | 6 +++--- drivers/acpi/sbs.c | 6 +++--- drivers/acpi/sbshc.c | 4 ++-- drivers/acpi/scan.c | 5 ++--- drivers/acpi/thermal.c | 4 ++-- drivers/acpi/video.c | 4 ++-- drivers/char/hpet.c | 2 +- drivers/char/sonypi.c | 2 +- drivers/hwmon/acpi_power_meter.c | 2 +- drivers/hwmon/asus_atk0110.c | 4 ++-- drivers/i2c/busses/i2c-scmi.c | 2 +- drivers/input/misc/atlas_btns.c | 2 +- drivers/platform/x86/asus-laptop.c | 2 +- drivers/platform/x86/classmate-laptop.c | 8 ++++---- drivers/platform/x86/eeepc-laptop.c | 2 +- drivers/platform/x86/fujitsu-laptop.c | 4 ++-- drivers/platform/x86/fujitsu-tablet.c | 2 +- drivers/platform/x86/hp_accel.c | 2 +- drivers/platform/x86/ideapad-laptop.c | 2 +- drivers/platform/x86/intel_menlow.c | 2 +- drivers/platform/x86/panasonic-laptop.c | 4 ++-- drivers/platform/x86/sony-laptop.c | 4 ++-- drivers/platform/x86/topstar-laptop.c | 2 +- drivers/platform/x86/toshiba_acpi.c | 4 ++-- drivers/platform/x86/toshiba_bluetooth.c | 4 ++-- drivers/platform/x86/wmi.c | 4 ++-- drivers/platform/x86/xo15-ebook.c | 2 +- drivers/staging/quickstart/quickstart.c | 2 +- drivers/video/backlight/apple_bl.c | 2 +- drivers/xen/xen-acpi-pad.c | 3 +-- include/acpi/acpi_bus.h | 2 +- 42 files changed, 67 insertions(+), 70 deletions(-)Index:
linux-pm/include/acpi/acpi_bus.h
===================================================================include/acpi/acpi_bus.h +0
-0@@ -89,7 +89,7 @@ struct acpi_device;*/
Quoted 7 lines
Quoted 5 lines
include/acpi/acpi_bus.h struct acpi_device; · line 94
Quoted 5 lines
include/acpi/acpi_bus.h +1
-1typedef 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);typedef int (*acpi_op_start ) (struct acpi_device * device);typedef void (*acpi_op_notify ) (struct acpi_device * device,u32 event);Acked-by Yinghai Lu <[email protected]>
Thanks!
Quoted 1 line
Also can you remove
acpi_op_start? there is no user with it.
Sure, I will.
Thanks,
Rafael
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 1/1 ACPI: Drop device start operation that is not used
From: Rafael J. Wysocki <[email protected]>
The ACPI device start operation, acpi_op_start, is never used, so drop it.
--- include/acpi/acpi_bus.h | 2 -- 1 file changed, 2 deletions(-)
include/acpi/acpi_bus.h +0 -2
@@ -90,13 +90,11 @@ struct acpi_device;typedef int (*acpi_op_add ) (struct acpi_device * device);typedef int (*acpi_op_remove ) (struct acpi_device * device); -typedef int (*acpi_op_start ) (struct acpi_device * device);typedef void (*acpi_op_notify ) (struct acpi_device * device,u32 event);struct acpi_device_ops {acpi_op_add add;acpi_op_remove remove; -acpi_op_start start;acpi_op_notify notify; };
Re: [PATCH] ACPI: Drop device start operation that is not used
Quoted 19 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
The ACPI device start operation,
acpi_op_start, is never used, so drop it.Signed-off-by Rafael J. Wysocki <[email protected]>--- include/acpi/acpi_bus.h | 2 -- 1 file changed, 2 deletions(-)Index:
linux-pm/include/acpi/acpi_bus.h
===================================================================include/acpi/acpi_bus.h +0
-0@@ -90,13 +90,11 @@ struct acpi_device;typedef int (*acpi_op_add ) (struct acpi_device * device);typedef int (*acpi_op_remove ) (struct acpi_device * device);
include/acpi/acpi_bus.h struct acpi_device; · line 100
Quoted 10 lines
include/acpi/acpi_bus.h +0
-2-typedef int (*acpi_op_start ) (struct acpi_device * device);typedef void (*acpi_op_notify ) (struct acpi_device * device,u32 event);struct acpi_device_ops {acpi_op_add add;acpi_op_remove remove; -acpi_op_start start;acpi_op_notify notify; };
Re: [PATCH] ACPI: Drop device start operation that is not used
In reply to Rafael J. WysockiQuoted 6 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
The ACPI device start operation,
acpi_op_start, is never used, so drop it.Signed-off-by Rafael J. Wysocki <[email protected]>
Thanks,
-Toshi
Quoted 23 lines
--- include/acpi/acpi_bus.h | 2 -- 1 file changed, 2 deletions(-)Index:
linux-pm/include/acpi/acpi_bus.h
===================================================================include/acpi/acpi_bus.h +0
-2@@ -90,13 +90,11 @@ struct acpi_device;typedef int (*acpi_op_add ) (struct acpi_device * device);typedef int (*acpi_op_remove ) (struct acpi_device * device); -typedef int (*acpi_op_start ) (struct acpi_device * device);typedef void (*acpi_op_notify ) (struct acpi_device * device,u32 event);struct acpi_device_ops {acpi_op_add add;acpi_op_remove remove; -acpi_op_start start;acpi_op_notify notify; };
Hi Rafael,
I have sent out a patch to do the same thing, so
Quoted 830 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
The second argument of ACPI driver .remove() operation is only used by the ACPI processor driver and the value passed to that driver through it is always available from the given struct
acpi_deviceobject'sremoval_typefield. For this reason, the second ACPI driver .remove() argument is in fact useless, so drop it.Signed-off-by Rafael J. Wysocki <[email protected]>--- drivers/acpi/ac.c | 4 ++-- drivers/acpi/acpi_memhotplug.c | 4 ++-- drivers/acpi/acpi_pad.c | 3 +-- drivers/acpi/battery.c | 2 +- drivers/acpi/button.c | 4 ++-- drivers/acpi/container.c | 4 ++-- drivers/acpi/ec.c | 2 +- drivers/acpi/fan.c | 4 ++-- drivers/acpi/hed.c | 2 +- drivers/acpi/pci_link.c | 4 ++-- drivers/acpi/pci_root.c | 4 ++-- drivers/acpi/processor_driver.c | 6 +++--- drivers/acpi/sbs.c | 6 +++--- drivers/acpi/sbshc.c | 4 ++-- drivers/acpi/scan.c | 5 ++--- drivers/acpi/thermal.c | 4 ++-- drivers/acpi/video.c | 4 ++-- drivers/char/hpet.c | 2 +- drivers/char/sonypi.c | 2 +- drivers/hwmon/acpi_power_meter.c | 2 +- drivers/hwmon/asus_atk0110.c | 4 ++-- drivers/i2c/busses/i2c-scmi.c | 2 +- drivers/input/misc/atlas_btns.c | 2 +- drivers/platform/x86/asus-laptop.c | 2 +- drivers/platform/x86/classmate-laptop.c | 8 ++++---- drivers/platform/x86/eeepc-laptop.c | 2 +- drivers/platform/x86/fujitsu-laptop.c | 4 ++-- drivers/platform/x86/fujitsu-tablet.c | 2 +- drivers/platform/x86/hp_accel.c | 2 +- drivers/platform/x86/ideapad-laptop.c | 2 +- drivers/platform/x86/intel_menlow.c | 2 +- drivers/platform/x86/panasonic-laptop.c | 4 ++-- drivers/platform/x86/sony-laptop.c | 4 ++-- drivers/platform/x86/topstar-laptop.c | 2 +- drivers/platform/x86/toshiba_acpi.c | 4 ++-- drivers/platform/x86/toshiba_bluetooth.c | 4 ++-- drivers/platform/x86/wmi.c | 4 ++-- drivers/platform/x86/xo15-ebook.c | 2 +- drivers/staging/quickstart/quickstart.c | 2 +- drivers/video/backlight/apple_bl.c | 2 +- drivers/xen/xen-acpi-pad.c | 3 +-- include/acpi/acpi_bus.h | 2 +- 42 files changed, 67 insertions(+), 70 deletions(-)Index:
linux-pm/include/acpi/acpi_bus.h
===================================================================include/acpi/acpi_bus.h +1
-1@@ -89,7 +89,7 @@ struct acpi_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);typedef int (*acpi_op_start ) (struct acpi_device * device);typedef void (*acpi_op_notify ) (struct acpi_device * device,u32 event);Index:
linux-pm/drivers/acpi/ec.c
===================================================================drivers/acpi/ec.c +1
-1@@ -852,7 +852,7 @@ static int acpi_ec_add(struct acpi_devicreturn ret; } -static int acpi_ec_remove (struct acpi_device *device,int type) +static int acpi_ec_remove (struct acpi_device *device) {struct acpi_ec *ec;struct acpi_ec_query_handler *handler, *tmp;Index:
linux-pm/drivers/acpi/pci_root.c
===================================================================drivers/acpi/pci_root.c +2
-2@@ -46,7 +46,7 @@ ACPI_MODULE_NAME("pci_root");#define ACPI_PCI_ROOT_CLASS "pci_bridge"#define ACPI_PCI_ROOT_DEVICE_NAME "PCI Root Bridge"static int acpi_pci_root_add (struct acpi_device *device); -static int acpi_pci_root_remove (struct acpi_device *device,int type); +static int acpi_pci_root_remove (struct acpi_device *device);#define ACPI_PCIE_REQ_SUPPORT (OSC_EXT_PCI_CONFIG_SUPPORT \ | OSC_ACTIVE_STATE_PWR_SUPPORT \@@ -609,7 +609,7 @@ end:return result; } -static int acpi_pci_root_remove (struct acpi_device *device,int type) +static int acpi_pci_root_remove (struct acpi_device *device) {acpi_status status;acpi_handle handle;Index:
linux-pm/drivers/acpi/pci_link.c
===================================================================drivers/acpi/pci_link.c +2
-2@@ -54,7 +54,7 @@ ACPI_MODULE_NAME("pci_link");#define ACPI_PCI_LINK_MAX_POSSIBLE 16static int acpi_pci_link_add (struct acpi_device *device); -static int acpi_pci_link_remove (struct acpi_device *device,int type); +static int acpi_pci_link_remove (struct acpi_device *device);static const struct acpi_device_id link_device_ids[] = { {"PNP0C0F" ,0 },@@ -766,7 +766,7 @@ static void irqrouter_resume(void) } } -static int acpi_pci_link_remove (struct acpi_device *device,int type) +static int acpi_pci_link_remove (struct acpi_device *device) {struct acpi_pci_link *link;Index:
linux-pm/drivers/char/hpet.c
===================================================================drivers/char/hpet.c +1
-1@@ -1041,7 +1041,7 @@ static int hpet_acpi_add(struct acpi_devreturn hpet_alloc (&data); } -static int hpet_acpi_remove (struct acpi_device *device,int type) +static int hpet_acpi_remove (struct acpi_device *device) {/* XXX need to unregister clocksource, dealloc mem, etc */ return -EINVAL ;Index:
linux-pm/drivers/acpi/container.c
===================================================================drivers/acpi/container.c +2
-2@@ -52,7 +52,7 @@ MODULE_DESCRIPTION("ACPI container driveMODULE_LICENSE ("GPL" );static int acpi_container_add (struct acpi_device *device); -static int acpi_container_remove (struct acpi_device *device,int type); +static int acpi_container_remove (struct acpi_device *device);static const struct acpi_device_id container_device_ids[] = { {"ACPI0004" ,0 },@@ -125,7 +125,7 @@ static int acpi_container_add(struct acpreturn 0 ; } -static int acpi_container_remove (struct acpi_device *device,int type) +static int acpi_container_remove (struct acpi_device *device) {acpi_status status =AE_OK ;struct acpi_container *pc =NULL ;Index:
linux-pm/drivers/acpi/processor_driver.c
===================================================================drivers/acpi/processor_driver.c +3
-3@@ -81,7 +81,7 @@ MODULE_DESCRIPTION("ACPI Processor DriveMODULE_LICENSE ("GPL" );static int acpi_processor_add (struct acpi_device *device); -static int acpi_processor_remove (struct acpi_device *device,int type); +static int acpi_processor_remove (struct acpi_device *device);static void acpi_processor_notify (struct acpi_device *device,u32 event);static acpi_status acpi_processor_hotadd_init (struct acpi_processor *pr);static int acpi_processor_handle_eject (struct acpi_processor *pr);@@ -610,7 +610,7 @@ err_free_pr:return result; } -static int acpi_processor_remove (struct acpi_device *device,int type) +static int acpi_processor_remove (struct acpi_device *device) {struct acpi_processor *pr =NULL ;@@ -623,7 +623,7 @@ static int acpi_processor_remove(structif (pr->id >= nr_cpu_ids) goto free; -if (type ==ACPI_BUS_REMOVAL_EJECT ) { +if (device->removal_type ==ACPI_BUS_REMOVAL_EJECT ) {if (acpi_processor_handle_eject (pr))return -EINVAL ; }Index:
linux-pm/drivers/acpi/scan.c
===================================================================drivers/acpi/scan.c +2
-3@@ -617,8 +617,7 @@ static int acpi_device_probe(struct devi ret =acpi_device_install_notify_handler (acpi_dev);if (ret) {if (acpi_drv->ops.remove) - acpi_drv->ops.remove (acpi_dev, - acpi_dev->removal_type); + acpi_drv->ops.remove (acpi_dev);return ret; } }@@ -640,7 +639,7 @@ static int acpi_device_remove(struct devif (acpi_drv->ops.notify)acpi_device_remove_notify_handler (acpi_dev);if (acpi_drv->ops.remove) - acpi_drv->ops.remove (acpi_dev, acpi_dev->removal_type); + acpi_drv->ops.remove (acpi_dev); } acpi_dev->driver =NULL ; acpi_dev->driver_data =NULL ;Index:
linux-pm/drivers/acpi/button.c
===================================================================drivers/acpi/button.c +2
-2@@ -75,7 +75,7 @@ static const struct acpi_device_id buttoMODULE_DEVICE_TABLE (acpi, button_device_ids);static int acpi_button_add (struct acpi_device *device); -static int acpi_button_remove (struct acpi_device *device,int type); +static int acpi_button_remove (struct acpi_device *device);static void acpi_button_notify (struct acpi_device *device,u32 event);#ifdef CONFIG_PM_SLEEP @@ -433,7 +433,7 @@ static int acpi_button_add(struct acpi_dreturn error; } -static int acpi_button_remove (struct acpi_device *device,int type) +static int acpi_button_remove (struct acpi_device *device) {struct acpi_button *button =acpi_driver_data (device);Index:
linux-pm/drivers/acpi/fan.c
===================================================================drivers/acpi/fan.c +2
-2@@ -45,7 +45,7 @@ MODULE_DESCRIPTION("ACPI Fan Driver");MODULE_LICENSE ("GPL" );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);static const struct acpi_device_id fan_device_ids[] = { {"PNP0C0B" ,0 },@@ -172,7 +172,7 @@ static int acpi_fan_add(struct acpi_devireturn result; } -static int acpi_fan_remove (struct acpi_device *device,int type) +static int acpi_fan_remove (struct acpi_device *device) {struct thermal_cooling_device *cdev =acpi_driver_data (device);Index:
linux-pm/drivers/acpi/sbs.c
===================================================================drivers/acpi/sbs.c +3
-3@@ -130,7 +130,7 @@ struct acpi_sbs {#define to_acpi_sbs (x) container_of(x, struct acpi_sbs, charger) -static int acpi_sbs_remove (struct acpi_device *device,int type); +static int acpi_sbs_remove (struct acpi_device *device);static int acpi_battery_get_state (struct acpi_battery *battery);static inline int battery_scale (int log)@@ -949,11 +949,11 @@ static int acpi_sbs_add(struct acpi_deviacpi_smbus_register_callback (sbs->hc, acpi_sbs_callback, sbs); end:if (result) -acpi_sbs_remove (device,0 ); +acpi_sbs_remove (device);return result; } -static int acpi_sbs_remove (struct acpi_device *device,int type) +static int acpi_sbs_remove (struct acpi_device *device) {struct acpi_sbs *sbs;int id;Index:
linux-pm/drivers/acpi/ac.c
===================================================================drivers/acpi/ac.c +2
-2@@ -60,7 +60,7 @@ static int acpi_ac_open_fs(struct inode#endif static int acpi_ac_add (struct acpi_device *device); -static int acpi_ac_remove (struct acpi_device *device,int type); +static int acpi_ac_remove (struct acpi_device *device);static void acpi_ac_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id ac_device_ids[] = {@@ -337,7 +337,7 @@ static int acpi_ac_resume(struct device }#endif -static int acpi_ac_remove (struct acpi_device *device,int type) +static int acpi_ac_remove (struct acpi_device *device) {struct acpi_ac *ac =NULL ;Index:
linux-pm/drivers/acpi/video.c
===================================================================drivers/acpi/video.c +2
-2@@ -88,7 +88,7 @@ module_param(use_bios_initial_backlight,static int register_count =0 ;static int acpi_video_bus_add (struct acpi_device *device); -static int acpi_video_bus_remove (struct acpi_device *device,int type); +static int acpi_video_bus_remove (struct acpi_device *device);static void acpi_video_bus_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id video_device_ids[] = {@@ -1740,7 +1740,7 @@ static int acpi_video_bus_add(struct acpreturn error; } -static int acpi_video_bus_remove (struct acpi_device *device,int type) +static int acpi_video_bus_remove (struct acpi_device *device) {struct acpi_video_bus *video =NULL ;Index:
linux-pm/drivers/hwmon/acpi_power_meter.c
===================================================================drivers/hwmon/acpi_power_meter.c +1
-1@@ -911,7 +911,7 @@ exit:return res; } -static int acpi_power_meter_remove (struct acpi_device *device,int type) +static int acpi_power_meter_remove (struct acpi_device *device) {struct acpi_power_meter_resource *resource;Index:
linux-pm/drivers/input/misc/atlas_btns.c
===================================================================drivers/input/misc/atlas_btns.c +1
-1@@ -121,7 +121,7 @@ static int atlas_acpi_button_add(structreturn err; } -static int atlas_acpi_button_remove (struct acpi_device *device,int type) +static int atlas_acpi_button_remove (struct acpi_device *device) {acpi_status status;Index:
linux-pm/drivers/i2c/busses/i2c-scmi.c
===================================================================drivers/i2c/busses/i2c-scmi.c +1
-1@@ -406,7 +406,7 @@ err:return -EIO ; } -static int acpi_smbus_cmi_remove (struct acpi_device *device,int type) +static int acpi_smbus_cmi_remove (struct acpi_device *device) {struct acpi_smbus_cmi *smbus_cmi =acpi_driver_data (device);Index:
linux-pm/drivers/acpi/thermal.c
===================================================================drivers/acpi/thermal.c +2
-2@@ -97,7 +97,7 @@ module_param(psv, int, 0644);MODULE_PARM_DESC (psv,"Disable or override all passive trip points." );static int acpi_thermal_add (struct acpi_device *device); -static int acpi_thermal_remove (struct acpi_device *device,int type); +static int acpi_thermal_remove (struct acpi_device *device);static void acpi_thermal_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id thermal_device_ids[] = {@@ -1115,7 +1115,7 @@ end:return result; } -static int acpi_thermal_remove (struct acpi_device *device,int type) +static int acpi_thermal_remove (struct acpi_device *device) {struct acpi_thermal *tz =NULL ;Index:
linux-pm/drivers/acpi/battery.c
===================================================================drivers/acpi/battery.c +1
-1@@ -1111,7 +1111,7 @@ fail:return result; } -static int acpi_battery_remove (struct acpi_device *device,int type) +static int acpi_battery_remove (struct acpi_device *device) {struct acpi_battery *battery =NULL ;Index:
linux-pm/drivers/acpi/sbshc.c
===================================================================drivers/acpi/sbshc.c +2
-2@@ -33,7 +33,7 @@ struct acpi_smb_hc { };static int acpi_smbus_hc_add (struct acpi_device *device); -static int acpi_smbus_hc_remove (struct acpi_device *device,int type); +static int acpi_smbus_hc_remove (struct acpi_device *device);static const struct acpi_device_id sbs_device_ids[] = { {"ACPI0001" ,0 },@@ -296,7 +296,7 @@ static int acpi_smbus_hc_add(struct acpiextern void acpi_ec_remove_query_handler (struct acpi_ec *ec,u8 query_bit); -static int acpi_smbus_hc_remove (struct acpi_device *device,int type) +static int acpi_smbus_hc_remove (struct acpi_device *device) {struct acpi_smb_hc *hc;Index:
linux-pm/drivers/acpi/hed.c
===================================================================drivers/acpi/hed.c +1
-1@@ -70,7 +70,7 @@ static int acpi_hed_add(struct acpi_devireturn 0 ; } -static int acpi_hed_remove (struct acpi_device *device,int type) +static int acpi_hed_remove (struct acpi_device *device) { hed_handle =NULL ;return 0 ;Index:
linux-pm/drivers/acpi/acpi_memhotplug.c
===================================================================drivers/acpi/acpi_memhotplug.c +2
-2@@ -54,7 +54,7 @@ MODULE_LICENSE("GPL");#define MEMORY_POWER_OFF_STATE 2static int acpi_memory_device_add (struct acpi_device *device); -static int acpi_memory_device_remove (struct acpi_device *device,int type); +static int acpi_memory_device_remove (struct acpi_device *device);static const struct acpi_device_id memory_device_ids[] = { {ACPI_MEMORY_DEVICE_HID ,0 },@@ -415,7 +415,7 @@ static int acpi_memory_device_add(structreturn result; } -static int acpi_memory_device_remove (struct acpi_device *device,int type) +static int acpi_memory_device_remove (struct acpi_device *device) {struct acpi_memory_device *mem_device =NULL ;int result;Index:
linux-pm/drivers/acpi/acpi_pad.c
===================================================================drivers/acpi/acpi_pad.c +1
-2@@ -482,8 +482,7 @@ static int acpi_pad_add(struct acpi_devireturn 0 ; } -static int acpi_pad_remove (struct acpi_device *device, -int type) +static int acpi_pad_remove (struct acpi_device *device) {mutex_lock (&isolated_cpus_lock);acpi_pad_idle_cpus (0 );Index:
linux-pm/drivers/char/sonypi.c
===================================================================drivers/char/sonypi.c +1
-1@@ -1142,7 +1142,7 @@ static int sonypi_acpi_add(struct acpi_dreturn 0 ; } -static int sonypi_acpi_remove (struct acpi_device *device,int type) +static int sonypi_acpi_remove (struct acpi_device *device) { sonypi_acpi_device =NULL ;return 0 ;Index:
linux-pm/drivers/hwmon/asus_atk0110.c
===================================================================drivers/hwmon/asus_atk0110.c +2
-2@@ -190,7 +190,7 @@ struct atk_acpi_input_buf { };static int atk_add (struct acpi_device *device); -static int atk_remove (struct acpi_device *device,int type); +static int atk_remove (struct acpi_device *device);static void atk_print_sensor (struct atk_data *data,union acpi_object *obj);static int atk_read_value (struct atk_sensor_data *sensor,u64 *value);static void atk_free_sensors (struct atk_data *data);@@ -1416,7 +1416,7 @@ out:return err; } -static int atk_remove (struct acpi_device *device,int type) +static int atk_remove (struct acpi_device *device) {struct atk_data *data = device->driver_data;dev_dbg (&device->dev,"removing...\n" );Index:
linux-pm/drivers/platform/x86/asus-laptop.c
===================================================================drivers/platform/x86/asus-laptop.c +1
-1@@ -1910,7 +1910,7 @@ fail_platform:return result; } -static int asus_acpi_remove (struct acpi_device *device,int type) +static int asus_acpi_remove (struct acpi_device *device) {struct asus_laptop *asus =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/classmate-laptop.c
===================================================================drivers/platform/x86/classmate-laptop.c +4
-4@@ -668,7 +668,7 @@ failed_file:return error; } -static int cmpc_accel_remove (struct acpi_device *acpi,int type) +static int cmpc_accel_remove (struct acpi_device *acpi) {struct input_dev *inputdev;struct cmpc_accel *accel;@@ -753,7 +753,7 @@ static int cmpc_tablet_add(struct acpi_d cmpc_tablet_idev_init); } -static int cmpc_tablet_remove (struct acpi_device *acpi,int type) +static int cmpc_tablet_remove (struct acpi_device *acpi) {return cmpc_remove_acpi_notify_device (acpi); }@@ -1000,7 +1000,7 @@ out_bd:return retval; } -static int cmpc_ipml_remove (struct acpi_device *acpi,int type) +static int cmpc_ipml_remove (struct acpi_device *acpi) {struct ipml200_dev *ipml;@@ -1079,7 +1079,7 @@ static int cmpc_keys_add(struct acpi_dev cmpc_keys_idev_init); } -static int cmpc_keys_remove (struct acpi_device *acpi,int type) +static int cmpc_keys_remove (struct acpi_device *acpi) {return cmpc_remove_acpi_notify_device (acpi); }Index:
linux-pm/drivers/platform/x86/eeepc-laptop.c
===================================================================drivers/platform/x86/eeepc-laptop.c +1
-1@@ -1501,7 +1501,7 @@ fail_platform:return result; } -static int eeepc_acpi_remove (struct acpi_device *device,int type) +static int eeepc_acpi_remove (struct acpi_device *device) {struct eeepc_laptop *eeepc =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/fujitsu-laptop.c
===================================================================drivers/platform/x86/fujitsu-laptop.c +2
-2@@ -733,7 +733,7 @@ err_stop:return result; } -static int acpi_fujitsu_remove (struct acpi_device *device,int type) +static int acpi_fujitsu_remove (struct acpi_device *device) {struct fujitsu_t *fujitsu =acpi_driver_data (device);struct input_dev *input = fujitsu->input;@@ -938,7 +938,7 @@ err_stop:return result; } -static int acpi_fujitsu_hotkey_remove (struct acpi_device *device,int type) +static int acpi_fujitsu_hotkey_remove (struct acpi_device *device) {struct fujitsu_hotkey_t *fujitsu_hotkey =acpi_driver_data (device);struct input_dev *input = fujitsu_hotkey->input;Index:
linux-pm/drivers/platform/x86/fujitsu-tablet.c
===================================================================drivers/platform/x86/fujitsu-tablet.c +1
-1@@ -431,7 +431,7 @@ static int acpi_fujitsu_add(struct acpi_return 0 ; } -static int acpi_fujitsu_remove (struct acpi_device *adev,int type) +static int acpi_fujitsu_remove (struct acpi_device *adev) {free_irq (fujitsu.irq, fujitsu_interrupt);release_region (fujitsu.io_base, fujitsu.io_length);Index:
linux-pm/drivers/platform/x86/hp_accel.c
===================================================================drivers/platform/x86/hp_accel.c +1
-1@@ -337,7 +337,7 @@ static int lis3lv02d_add(struct acpi_devreturn ret; } -static int lis3lv02d_remove (struct acpi_device *device,int type) +static int lis3lv02d_remove (struct acpi_device *device) {if (!device)return -EINVAL ;Index:
linux-pm/drivers/platform/x86/ideapad-laptop.c
===================================================================drivers/platform/x86/ideapad-laptop.c +1
-1@@ -834,7 +834,7 @@ platform_failed:return ret; } -static int ideapad_acpi_remove (struct acpi_device *adevice,int type) +static int ideapad_acpi_remove (struct acpi_device *adevice) {struct ideapad_private *priv =dev_get_drvdata (&adevice->dev);int i;Index:
linux-pm/drivers/platform/x86/intel_menlow.c
===================================================================drivers/platform/x86/intel_menlow.c +1
-1@@ -200,7 +200,7 @@ static int intel_menlow_memory_add(struc } -static int intel_menlow_memory_remove (struct acpi_device *device,int type) +static int intel_menlow_memory_remove (struct acpi_device *device) {struct thermal_cooling_device *cdev =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/panasonic-laptop.c
===================================================================drivers/platform/x86/panasonic-laptop.c +2
-2@@ -176,7 +176,7 @@ enum SINF_BITS { SINF_NUM_BATTERIES = 0,/* R1 handles SINF_AC_CUR_BRIGHT as SINF_CUR_BRIGHT, doesn't know AC state */ static int acpi_pcc_hotkey_add (struct acpi_device *device); -static int acpi_pcc_hotkey_remove (struct acpi_device *device,int type); +static int acpi_pcc_hotkey_remove (struct acpi_device *device);static void acpi_pcc_hotkey_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id pcc_device_ids[] = {@@ -663,7 +663,7 @@ static int __init acpi_pcc_init(void)return 0 ; } -static int acpi_pcc_hotkey_remove (struct acpi_device *device,int type) +static int acpi_pcc_hotkey_remove (struct acpi_device *device) {struct pcc_acpi *pcc =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/sony-laptop.c
===================================================================drivers/platform/x86/sony-laptop.c +2
-2@@ -2740,7 +2740,7 @@ outwalk:return result; } -static int sony_nc_remove (struct acpi_device *device,int type) +static int sony_nc_remove (struct acpi_device *device) {struct sony_nc_value *item;@@ -4111,7 +4111,7 @@ found:* ACPI driver * *****************/ -static int sony_pic_remove (struct acpi_device *device,int type) +static int sony_pic_remove (struct acpi_device *device) {struct sony_pic_ioport *io, *tmp_io;struct sony_pic_irq *irq, *tmp_irq;Index:
linux-pm/drivers/platform/x86/topstar-laptop.c
===================================================================drivers/platform/x86/topstar-laptop.c +1
-1@@ -157,7 +157,7 @@ add_err:return -ENODEV ; } -static int acpi_topstar_remove (struct acpi_device *device,int type) +static int acpi_topstar_remove (struct acpi_device *device) {struct topstar_hkey *tps_hkey =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/toshiba_acpi.c
===================================================================drivers/platform/x86/toshiba_acpi.c +2
-2@@ -1118,7 +1118,7 @@ static int toshiba_acpi_setup_backlight(return 0 ; } -static int toshiba_acpi_remove (struct acpi_device *acpi_dev,int type) +static int toshiba_acpi_remove (struct acpi_device *acpi_dev) {struct toshiba_acpi_dev *dev =acpi_driver_data (acpi_dev);@@ -1250,7 +1250,7 @@ static int toshiba_acpi_add(struct acpi_return 0 ; error: -toshiba_acpi_remove (acpi_dev,0 ); +toshiba_acpi_remove (acpi_dev);return ret; }Index:
linux-pm/drivers/platform/x86/toshiba_bluetooth.c
===================================================================drivers/platform/x86/toshiba_bluetooth.c +2
-2@@ -32,7 +32,7 @@ MODULE_LICENSE("GPL");static int toshiba_bt_rfkill_add (struct acpi_device *device); -static int toshiba_bt_rfkill_remove (struct acpi_device *device,int type); +static int toshiba_bt_rfkill_remove (struct acpi_device *device);static void toshiba_bt_rfkill_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id bt_device_ids[] = {@@ -122,7 +122,7 @@ static int toshiba_bt_rfkill_add(structreturn result; } -static int toshiba_bt_rfkill_remove (struct acpi_device *device,int type) +static int toshiba_bt_rfkill_remove (struct acpi_device *device) {/* clean up */ return 0 ;Index:
linux-pm/drivers/platform/x86/wmi.c
===================================================================drivers/platform/x86/wmi.c +2
-2@@ -92,7 +92,7 @@ module_param(debug_dump_wdg, bool, 0444)MODULE_PARM_DESC (debug_dump_wdg,"Dump available WMI interfaces [0/1]" ); -static int acpi_wmi_remove (struct acpi_device *device,int type); +static int acpi_wmi_remove (struct acpi_device *device);static int acpi_wmi_add (struct acpi_device *device);static void acpi_wmi_notify (struct acpi_device *device,u32 event);@@ -917,7 +917,7 @@ static void acpi_wmi_notify(struct acpi_ } } -static int acpi_wmi_remove (struct acpi_device *device,int type) +static int acpi_wmi_remove (struct acpi_device *device) {acpi_remove_address_space_handler (device->handle,ACPI_ADR_SPACE_EC , &acpi_wmi_ec_space_handler);Index:
linux-pm/drivers/platform/x86/xo15-ebook.c
===================================================================drivers/platform/x86/xo15-ebook.c +1
-1@@ -150,7 +150,7 @@ static int ebook_switch_add(struct acpi_return error; } -static int ebook_switch_remove (struct acpi_device *device,int type) +static int ebook_switch_remove (struct acpi_device *device) {struct ebook_switch *button =acpi_driver_data (device);Index:
linux-pm/drivers/staging/quickstart/quickstart.c
===================================================================drivers/staging/quickstart/quickstart.c +1
-1@@ -296,7 +296,7 @@ fail_config:return ret; } -static int quickstart_acpi_remove (struct acpi_device *device,int type) +static int quickstart_acpi_remove (struct acpi_device *device) {acpi_status status;struct quickstart_acpi *quickstart;Index:
linux-pm/drivers/video/backlight/apple_bl.c
===================================================================drivers/video/backlight/apple_bl.c +1
-1@@ -196,7 +196,7 @@ static int apple_bl_add(struct acpi_devireturn 0 ; } -static int apple_bl_remove (struct acpi_device *dev,int type) +static int apple_bl_remove (struct acpi_device *dev) {backlight_device_unregister (apple_backlight_device);Index:
linux-pm/drivers/xen/xen-acpi-pad.c
===================================================================drivers/xen/xen-acpi-pad.c +1
-3@@ -140,8 +140,7 @@ static int acpi_pad_add(struct acpi_devireturn 0 ; } -static int acpi_pad_remove (struct acpi_device *device, -int type) +static int acpi_pad_remove (struct acpi_device *device) {mutex_lock (&xen_cpu_lock);xen_acpi_pad_idle_cpus (0 ); --To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Jiang Liu
Hi Rafael,
I have sent out a patch to do the same thing, soReviewed-by Jiang Liu <[email protected]>
Thanks!
Quoted 832 lines · Rafael J. Wysocki
Quoted 830 lines
From: Rafael J. Wysocki <[email protected]>
The second argument of ACPI driver .remove() operation is only used by the ACPI processor driver and the value passed to that driver through it is always available from the given struct
acpi_deviceobject'sremoval_typefield. For this reason, the second ACPI driver .remove() argument is in fact useless, so drop it.Signed-off-by Rafael J. Wysocki <[email protected]>--- drivers/acpi/ac.c | 4 ++-- drivers/acpi/acpi_memhotplug.c | 4 ++-- drivers/acpi/acpi_pad.c | 3 +-- drivers/acpi/battery.c | 2 +- drivers/acpi/button.c | 4 ++-- drivers/acpi/container.c | 4 ++-- drivers/acpi/ec.c | 2 +- drivers/acpi/fan.c | 4 ++-- drivers/acpi/hed.c | 2 +- drivers/acpi/pci_link.c | 4 ++-- drivers/acpi/pci_root.c | 4 ++-- drivers/acpi/processor_driver.c | 6 +++--- drivers/acpi/sbs.c | 6 +++--- drivers/acpi/sbshc.c | 4 ++-- drivers/acpi/scan.c | 5 ++--- drivers/acpi/thermal.c | 4 ++-- drivers/acpi/video.c | 4 ++-- drivers/char/hpet.c | 2 +- drivers/char/sonypi.c | 2 +- drivers/hwmon/acpi_power_meter.c | 2 +- drivers/hwmon/asus_atk0110.c | 4 ++-- drivers/i2c/busses/i2c-scmi.c | 2 +- drivers/input/misc/atlas_btns.c | 2 +- drivers/platform/x86/asus-laptop.c | 2 +- drivers/platform/x86/classmate-laptop.c | 8 ++++---- drivers/platform/x86/eeepc-laptop.c | 2 +- drivers/platform/x86/fujitsu-laptop.c | 4 ++-- drivers/platform/x86/fujitsu-tablet.c | 2 +- drivers/platform/x86/hp_accel.c | 2 +- drivers/platform/x86/ideapad-laptop.c | 2 +- drivers/platform/x86/intel_menlow.c | 2 +- drivers/platform/x86/panasonic-laptop.c | 4 ++-- drivers/platform/x86/sony-laptop.c | 4 ++-- drivers/platform/x86/topstar-laptop.c | 2 +- drivers/platform/x86/toshiba_acpi.c | 4 ++-- drivers/platform/x86/toshiba_bluetooth.c | 4 ++-- drivers/platform/x86/wmi.c | 4 ++-- drivers/platform/x86/xo15-ebook.c | 2 +- drivers/staging/quickstart/quickstart.c | 2 +- drivers/video/backlight/apple_bl.c | 2 +- drivers/xen/xen-acpi-pad.c | 3 +-- include/acpi/acpi_bus.h | 2 +- 42 files changed, 67 insertions(+), 70 deletions(-)Index:
linux-pm/include/acpi/acpi_bus.h
===================================================================include/acpi/acpi_bus.h +1
-1@@ -89,7 +89,7 @@ struct acpi_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);typedef int (*acpi_op_start ) (struct acpi_device * device);typedef void (*acpi_op_notify ) (struct acpi_device * device,u32 event);Index:
linux-pm/drivers/acpi/ec.c
===================================================================drivers/acpi/ec.c +1
-1@@ -852,7 +852,7 @@ static int acpi_ec_add(struct acpi_devicreturn ret; } -static int acpi_ec_remove (struct acpi_device *device,int type) +static int acpi_ec_remove (struct acpi_device *device) {struct acpi_ec *ec;struct acpi_ec_query_handler *handler, *tmp;Index:
linux-pm/drivers/acpi/pci_root.c
===================================================================drivers/acpi/pci_root.c +2
-2@@ -46,7 +46,7 @@ ACPI_MODULE_NAME("pci_root");#define ACPI_PCI_ROOT_CLASS "pci_bridge"#define ACPI_PCI_ROOT_DEVICE_NAME "PCI Root Bridge"static int acpi_pci_root_add (struct acpi_device *device); -static int acpi_pci_root_remove (struct acpi_device *device,int type); +static int acpi_pci_root_remove (struct acpi_device *device);#define ACPI_PCIE_REQ_SUPPORT (OSC_EXT_PCI_CONFIG_SUPPORT \ | OSC_ACTIVE_STATE_PWR_SUPPORT \@@ -609,7 +609,7 @@ end:return result; } -static int acpi_pci_root_remove (struct acpi_device *device,int type) +static int acpi_pci_root_remove (struct acpi_device *device) {acpi_status status;acpi_handle handle;Index:
linux-pm/drivers/acpi/pci_link.c
===================================================================drivers/acpi/pci_link.c +2
-2@@ -54,7 +54,7 @@ ACPI_MODULE_NAME("pci_link");#define ACPI_PCI_LINK_MAX_POSSIBLE 16static int acpi_pci_link_add (struct acpi_device *device); -static int acpi_pci_link_remove (struct acpi_device *device,int type); +static int acpi_pci_link_remove (struct acpi_device *device);static const struct acpi_device_id link_device_ids[] = { {"PNP0C0F" ,0 },@@ -766,7 +766,7 @@ static void irqrouter_resume(void) } } -static int acpi_pci_link_remove (struct acpi_device *device,int type) +static int acpi_pci_link_remove (struct acpi_device *device) {struct acpi_pci_link *link;Index:
linux-pm/drivers/char/hpet.c
===================================================================drivers/char/hpet.c +1
-1@@ -1041,7 +1041,7 @@ static int hpet_acpi_add(struct acpi_devreturn hpet_alloc (&data); } -static int hpet_acpi_remove (struct acpi_device *device,int type) +static int hpet_acpi_remove (struct acpi_device *device) {/* XXX need to unregister clocksource, dealloc mem, etc */ return -EINVAL ;Index:
linux-pm/drivers/acpi/container.c
===================================================================drivers/acpi/container.c +2
-2@@ -52,7 +52,7 @@ MODULE_DESCRIPTION("ACPI container driveMODULE_LICENSE ("GPL" );static int acpi_container_add (struct acpi_device *device); -static int acpi_container_remove (struct acpi_device *device,int type); +static int acpi_container_remove (struct acpi_device *device);static const struct acpi_device_id container_device_ids[] = { {"ACPI0004" ,0 },@@ -125,7 +125,7 @@ static int acpi_container_add(struct acpreturn 0 ; } -static int acpi_container_remove (struct acpi_device *device,int type) +static int acpi_container_remove (struct acpi_device *device) {acpi_status status =AE_OK ;struct acpi_container *pc =NULL ;Index:
linux-pm/drivers/acpi/processor_driver.c
===================================================================drivers/acpi/processor_driver.c +3
-3@@ -81,7 +81,7 @@ MODULE_DESCRIPTION("ACPI Processor DriveMODULE_LICENSE ("GPL" );static int acpi_processor_add (struct acpi_device *device); -static int acpi_processor_remove (struct acpi_device *device,int type); +static int acpi_processor_remove (struct acpi_device *device);static void acpi_processor_notify (struct acpi_device *device,u32 event);static acpi_status acpi_processor_hotadd_init (struct acpi_processor *pr);static int acpi_processor_handle_eject (struct acpi_processor *pr);@@ -610,7 +610,7 @@ err_free_pr:return result; } -static int acpi_processor_remove (struct acpi_device *device,int type) +static int acpi_processor_remove (struct acpi_device *device) {struct acpi_processor *pr =NULL ;@@ -623,7 +623,7 @@ static int acpi_processor_remove(structif (pr->id >= nr_cpu_ids) goto free; -if (type ==ACPI_BUS_REMOVAL_EJECT ) { +if (device->removal_type ==ACPI_BUS_REMOVAL_EJECT ) {if (acpi_processor_handle_eject (pr))return -EINVAL ; }Index:
linux-pm/drivers/acpi/scan.c
===================================================================drivers/acpi/scan.c +2
-3@@ -617,8 +617,7 @@ static int acpi_device_probe(struct devi ret =acpi_device_install_notify_handler (acpi_dev);if (ret) {if (acpi_drv->ops.remove) - acpi_drv->ops.remove (acpi_dev, - acpi_dev->removal_type); + acpi_drv->ops.remove (acpi_dev);return ret; } }@@ -640,7 +639,7 @@ static int acpi_device_remove(struct devif (acpi_drv->ops.notify)acpi_device_remove_notify_handler (acpi_dev);if (acpi_drv->ops.remove) - acpi_drv->ops.remove (acpi_dev, acpi_dev->removal_type); + acpi_drv->ops.remove (acpi_dev); } acpi_dev->driver =NULL ; acpi_dev->driver_data =NULL ;Index:
linux-pm/drivers/acpi/button.c
===================================================================drivers/acpi/button.c +2
-2@@ -75,7 +75,7 @@ static const struct acpi_device_id buttoMODULE_DEVICE_TABLE (acpi, button_device_ids);static int acpi_button_add (struct acpi_device *device); -static int acpi_button_remove (struct acpi_device *device,int type); +static int acpi_button_remove (struct acpi_device *device);static void acpi_button_notify (struct acpi_device *device,u32 event);#ifdef CONFIG_PM_SLEEP @@ -433,7 +433,7 @@ static int acpi_button_add(struct acpi_dreturn error; } -static int acpi_button_remove (struct acpi_device *device,int type) +static int acpi_button_remove (struct acpi_device *device) {struct acpi_button *button =acpi_driver_data (device);Index:
linux-pm/drivers/acpi/fan.c
===================================================================drivers/acpi/fan.c +2
-2@@ -45,7 +45,7 @@ MODULE_DESCRIPTION("ACPI Fan Driver");MODULE_LICENSE ("GPL" );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);static const struct acpi_device_id fan_device_ids[] = { {"PNP0C0B" ,0 },@@ -172,7 +172,7 @@ static int acpi_fan_add(struct acpi_devireturn result; } -static int acpi_fan_remove (struct acpi_device *device,int type) +static int acpi_fan_remove (struct acpi_device *device) {struct thermal_cooling_device *cdev =acpi_driver_data (device);Index:
linux-pm/drivers/acpi/sbs.c
===================================================================drivers/acpi/sbs.c +3
-3@@ -130,7 +130,7 @@ struct acpi_sbs {#define to_acpi_sbs (x) container_of(x, struct acpi_sbs, charger) -static int acpi_sbs_remove (struct acpi_device *device,int type); +static int acpi_sbs_remove (struct acpi_device *device);static int acpi_battery_get_state (struct acpi_battery *battery);static inline int battery_scale (int log)@@ -949,11 +949,11 @@ static int acpi_sbs_add(struct acpi_deviacpi_smbus_register_callback (sbs->hc, acpi_sbs_callback, sbs); end:if (result) -acpi_sbs_remove (device,0 ); +acpi_sbs_remove (device);return result; } -static int acpi_sbs_remove (struct acpi_device *device,int type) +static int acpi_sbs_remove (struct acpi_device *device) {struct acpi_sbs *sbs;int id;Index:
linux-pm/drivers/acpi/ac.c
===================================================================drivers/acpi/ac.c +2
-2@@ -60,7 +60,7 @@ static int acpi_ac_open_fs(struct inode#endif static int acpi_ac_add (struct acpi_device *device); -static int acpi_ac_remove (struct acpi_device *device,int type); +static int acpi_ac_remove (struct acpi_device *device);static void acpi_ac_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id ac_device_ids[] = {@@ -337,7 +337,7 @@ static int acpi_ac_resume(struct device }#endif -static int acpi_ac_remove (struct acpi_device *device,int type) +static int acpi_ac_remove (struct acpi_device *device) {struct acpi_ac *ac =NULL ;Index:
linux-pm/drivers/acpi/video.c
===================================================================drivers/acpi/video.c +2
-2@@ -88,7 +88,7 @@ module_param(use_bios_initial_backlight,static int register_count =0 ;static int acpi_video_bus_add (struct acpi_device *device); -static int acpi_video_bus_remove (struct acpi_device *device,int type); +static int acpi_video_bus_remove (struct acpi_device *device);static void acpi_video_bus_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id video_device_ids[] = {@@ -1740,7 +1740,7 @@ static int acpi_video_bus_add(struct acpreturn error; } -static int acpi_video_bus_remove (struct acpi_device *device,int type) +static int acpi_video_bus_remove (struct acpi_device *device) {struct acpi_video_bus *video =NULL ;Index:
linux-pm/drivers/hwmon/acpi_power_meter.c
===================================================================drivers/hwmon/acpi_power_meter.c +1
-1@@ -911,7 +911,7 @@ exit:return res; } -static int acpi_power_meter_remove (struct acpi_device *device,int type) +static int acpi_power_meter_remove (struct acpi_device *device) {struct acpi_power_meter_resource *resource;Index:
linux-pm/drivers/input/misc/atlas_btns.c
===================================================================drivers/input/misc/atlas_btns.c +1
-1@@ -121,7 +121,7 @@ static int atlas_acpi_button_add(structreturn err; } -static int atlas_acpi_button_remove (struct acpi_device *device,int type) +static int atlas_acpi_button_remove (struct acpi_device *device) {acpi_status status;Index:
linux-pm/drivers/i2c/busses/i2c-scmi.c
===================================================================drivers/i2c/busses/i2c-scmi.c +1
-1@@ -406,7 +406,7 @@ err:return -EIO ; } -static int acpi_smbus_cmi_remove (struct acpi_device *device,int type) +static int acpi_smbus_cmi_remove (struct acpi_device *device) {struct acpi_smbus_cmi *smbus_cmi =acpi_driver_data (device);Index:
linux-pm/drivers/acpi/thermal.c
===================================================================drivers/acpi/thermal.c +2
-2@@ -97,7 +97,7 @@ module_param(psv, int, 0644);MODULE_PARM_DESC (psv,"Disable or override all passive trip points." );static int acpi_thermal_add (struct acpi_device *device); -static int acpi_thermal_remove (struct acpi_device *device,int type); +static int acpi_thermal_remove (struct acpi_device *device);static void acpi_thermal_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id thermal_device_ids[] = {@@ -1115,7 +1115,7 @@ end:return result; } -static int acpi_thermal_remove (struct acpi_device *device,int type) +static int acpi_thermal_remove (struct acpi_device *device) {struct acpi_thermal *tz =NULL ;Index:
linux-pm/drivers/acpi/battery.c
===================================================================drivers/acpi/battery.c +1
-1@@ -1111,7 +1111,7 @@ fail:return result; } -static int acpi_battery_remove (struct acpi_device *device,int type) +static int acpi_battery_remove (struct acpi_device *device) {struct acpi_battery *battery =NULL ;Index:
linux-pm/drivers/acpi/sbshc.c
===================================================================drivers/acpi/sbshc.c +2
-2@@ -33,7 +33,7 @@ struct acpi_smb_hc { };static int acpi_smbus_hc_add (struct acpi_device *device); -static int acpi_smbus_hc_remove (struct acpi_device *device,int type); +static int acpi_smbus_hc_remove (struct acpi_device *device);static const struct acpi_device_id sbs_device_ids[] = { {"ACPI0001" ,0 },@@ -296,7 +296,7 @@ static int acpi_smbus_hc_add(struct acpiextern void acpi_ec_remove_query_handler (struct acpi_ec *ec,u8 query_bit); -static int acpi_smbus_hc_remove (struct acpi_device *device,int type) +static int acpi_smbus_hc_remove (struct acpi_device *device) {struct acpi_smb_hc *hc;Index:
linux-pm/drivers/acpi/hed.c
===================================================================drivers/acpi/hed.c +1
-1@@ -70,7 +70,7 @@ static int acpi_hed_add(struct acpi_devireturn 0 ; } -static int acpi_hed_remove (struct acpi_device *device,int type) +static int acpi_hed_remove (struct acpi_device *device) { hed_handle =NULL ;return 0 ;Index:
linux-pm/drivers/acpi/acpi_memhotplug.c
===================================================================drivers/acpi/acpi_memhotplug.c +2
-2@@ -54,7 +54,7 @@ MODULE_LICENSE("GPL");#define MEMORY_POWER_OFF_STATE 2static int acpi_memory_device_add (struct acpi_device *device); -static int acpi_memory_device_remove (struct acpi_device *device,int type); +static int acpi_memory_device_remove (struct acpi_device *device);static const struct acpi_device_id memory_device_ids[] = { {ACPI_MEMORY_DEVICE_HID ,0 },@@ -415,7 +415,7 @@ static int acpi_memory_device_add(structreturn result; } -static int acpi_memory_device_remove (struct acpi_device *device,int type) +static int acpi_memory_device_remove (struct acpi_device *device) {struct acpi_memory_device *mem_device =NULL ;int result;Index:
linux-pm/drivers/acpi/acpi_pad.c
===================================================================drivers/acpi/acpi_pad.c +1
-2@@ -482,8 +482,7 @@ static int acpi_pad_add(struct acpi_devireturn 0 ; } -static int acpi_pad_remove (struct acpi_device *device, -int type) +static int acpi_pad_remove (struct acpi_device *device) {mutex_lock (&isolated_cpus_lock);acpi_pad_idle_cpus (0 );Index:
linux-pm/drivers/char/sonypi.c
===================================================================drivers/char/sonypi.c +1
-1@@ -1142,7 +1142,7 @@ static int sonypi_acpi_add(struct acpi_dreturn 0 ; } -static int sonypi_acpi_remove (struct acpi_device *device,int type) +static int sonypi_acpi_remove (struct acpi_device *device) { sonypi_acpi_device =NULL ;return 0 ;Index:
linux-pm/drivers/hwmon/asus_atk0110.c
===================================================================drivers/hwmon/asus_atk0110.c +2
-2@@ -190,7 +190,7 @@ struct atk_acpi_input_buf { };static int atk_add (struct acpi_device *device); -static int atk_remove (struct acpi_device *device,int type); +static int atk_remove (struct acpi_device *device);static void atk_print_sensor (struct atk_data *data,union acpi_object *obj);static int atk_read_value (struct atk_sensor_data *sensor,u64 *value);static void atk_free_sensors (struct atk_data *data);@@ -1416,7 +1416,7 @@ out:return err; } -static int atk_remove (struct acpi_device *device,int type) +static int atk_remove (struct acpi_device *device) {struct atk_data *data = device->driver_data;dev_dbg (&device->dev,"removing...\n" );Index:
linux-pm/drivers/platform/x86/asus-laptop.c
===================================================================drivers/platform/x86/asus-laptop.c +1
-1@@ -1910,7 +1910,7 @@ fail_platform:return result; } -static int asus_acpi_remove (struct acpi_device *device,int type) +static int asus_acpi_remove (struct acpi_device *device) {struct asus_laptop *asus =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/classmate-laptop.c
===================================================================drivers/platform/x86/classmate-laptop.c +4
-4@@ -668,7 +668,7 @@ failed_file:return error; } -static int cmpc_accel_remove (struct acpi_device *acpi,int type) +static int cmpc_accel_remove (struct acpi_device *acpi) {struct input_dev *inputdev;struct cmpc_accel *accel;@@ -753,7 +753,7 @@ static int cmpc_tablet_add(struct acpi_d cmpc_tablet_idev_init); } -static int cmpc_tablet_remove (struct acpi_device *acpi,int type) +static int cmpc_tablet_remove (struct acpi_device *acpi) {return cmpc_remove_acpi_notify_device (acpi); }@@ -1000,7 +1000,7 @@ out_bd:return retval; } -static int cmpc_ipml_remove (struct acpi_device *acpi,int type) +static int cmpc_ipml_remove (struct acpi_device *acpi) {struct ipml200_dev *ipml;@@ -1079,7 +1079,7 @@ static int cmpc_keys_add(struct acpi_dev cmpc_keys_idev_init); } -static int cmpc_keys_remove (struct acpi_device *acpi,int type) +static int cmpc_keys_remove (struct acpi_device *acpi) {return cmpc_remove_acpi_notify_device (acpi); }Index:
linux-pm/drivers/platform/x86/eeepc-laptop.c
===================================================================drivers/platform/x86/eeepc-laptop.c +1
-1@@ -1501,7 +1501,7 @@ fail_platform:return result; } -static int eeepc_acpi_remove (struct acpi_device *device,int type) +static int eeepc_acpi_remove (struct acpi_device *device) {struct eeepc_laptop *eeepc =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/fujitsu-laptop.c
===================================================================drivers/platform/x86/fujitsu-laptop.c +2
-2@@ -733,7 +733,7 @@ err_stop:return result; } -static int acpi_fujitsu_remove (struct acpi_device *device,int type) +static int acpi_fujitsu_remove (struct acpi_device *device) {struct fujitsu_t *fujitsu =acpi_driver_data (device);struct input_dev *input = fujitsu->input;@@ -938,7 +938,7 @@ err_stop:return result; } -static int acpi_fujitsu_hotkey_remove (struct acpi_device *device,int type) +static int acpi_fujitsu_hotkey_remove (struct acpi_device *device) {struct fujitsu_hotkey_t *fujitsu_hotkey =acpi_driver_data (device);struct input_dev *input = fujitsu_hotkey->input;Index:
linux-pm/drivers/platform/x86/fujitsu-tablet.c
===================================================================drivers/platform/x86/fujitsu-tablet.c +1
-1@@ -431,7 +431,7 @@ static int acpi_fujitsu_add(struct acpi_return 0 ; } -static int acpi_fujitsu_remove (struct acpi_device *adev,int type) +static int acpi_fujitsu_remove (struct acpi_device *adev) {free_irq (fujitsu.irq, fujitsu_interrupt);release_region (fujitsu.io_base, fujitsu.io_length);Index:
linux-pm/drivers/platform/x86/hp_accel.c
===================================================================drivers/platform/x86/hp_accel.c +1
-1@@ -337,7 +337,7 @@ static int lis3lv02d_add(struct acpi_devreturn ret; } -static int lis3lv02d_remove (struct acpi_device *device,int type) +static int lis3lv02d_remove (struct acpi_device *device) {if (!device)return -EINVAL ;Index:
linux-pm/drivers/platform/x86/ideapad-laptop.c
===================================================================drivers/platform/x86/ideapad-laptop.c +1
-1@@ -834,7 +834,7 @@ platform_failed:return ret; } -static int ideapad_acpi_remove (struct acpi_device *adevice,int type) +static int ideapad_acpi_remove (struct acpi_device *adevice) {struct ideapad_private *priv =dev_get_drvdata (&adevice->dev);int i;Index:
linux-pm/drivers/platform/x86/intel_menlow.c
===================================================================drivers/platform/x86/intel_menlow.c +1
-1@@ -200,7 +200,7 @@ static int intel_menlow_memory_add(struc } -static int intel_menlow_memory_remove (struct acpi_device *device,int type) +static int intel_menlow_memory_remove (struct acpi_device *device) {struct thermal_cooling_device *cdev =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/panasonic-laptop.c
===================================================================drivers/platform/x86/panasonic-laptop.c +2
-2@@ -176,7 +176,7 @@ enum SINF_BITS { SINF_NUM_BATTERIES = 0,/* R1 handles SINF_AC_CUR_BRIGHT as SINF_CUR_BRIGHT, doesn't know AC state */ static int acpi_pcc_hotkey_add (struct acpi_device *device); -static int acpi_pcc_hotkey_remove (struct acpi_device *device,int type); +static int acpi_pcc_hotkey_remove (struct acpi_device *device);static void acpi_pcc_hotkey_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id pcc_device_ids[] = {@@ -663,7 +663,7 @@ static int __init acpi_pcc_init(void)return 0 ; } -static int acpi_pcc_hotkey_remove (struct acpi_device *device,int type) +static int acpi_pcc_hotkey_remove (struct acpi_device *device) {struct pcc_acpi *pcc =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/sony-laptop.c
===================================================================drivers/platform/x86/sony-laptop.c +2
-2@@ -2740,7 +2740,7 @@ outwalk:return result; } -static int sony_nc_remove (struct acpi_device *device,int type) +static int sony_nc_remove (struct acpi_device *device) {struct sony_nc_value *item;@@ -4111,7 +4111,7 @@ found:* ACPI driver * *****************/ -static int sony_pic_remove (struct acpi_device *device,int type) +static int sony_pic_remove (struct acpi_device *device) {struct sony_pic_ioport *io, *tmp_io;struct sony_pic_irq *irq, *tmp_irq;Index:
linux-pm/drivers/platform/x86/topstar-laptop.c
===================================================================drivers/platform/x86/topstar-laptop.c +1
-1@@ -157,7 +157,7 @@ add_err:return -ENODEV ; } -static int acpi_topstar_remove (struct acpi_device *device,int type) +static int acpi_topstar_remove (struct acpi_device *device) {struct topstar_hkey *tps_hkey =acpi_driver_data (device);Index:
linux-pm/drivers/platform/x86/toshiba_acpi.c
===================================================================drivers/platform/x86/toshiba_acpi.c +2
-2@@ -1118,7 +1118,7 @@ static int toshiba_acpi_setup_backlight(return 0 ; } -static int toshiba_acpi_remove (struct acpi_device *acpi_dev,int type) +static int toshiba_acpi_remove (struct acpi_device *acpi_dev) {struct toshiba_acpi_dev *dev =acpi_driver_data (acpi_dev);@@ -1250,7 +1250,7 @@ static int toshiba_acpi_add(struct acpi_return 0 ; error: -toshiba_acpi_remove (acpi_dev,0 ); +toshiba_acpi_remove (acpi_dev);return ret; }Index:
linux-pm/drivers/platform/x86/toshiba_bluetooth.c
===================================================================drivers/platform/x86/toshiba_bluetooth.c +2
-2@@ -32,7 +32,7 @@ MODULE_LICENSE("GPL");static int toshiba_bt_rfkill_add (struct acpi_device *device); -static int toshiba_bt_rfkill_remove (struct acpi_device *device,int type); +static int toshiba_bt_rfkill_remove (struct acpi_device *device);static void toshiba_bt_rfkill_notify (struct acpi_device *device,u32 event);static const struct acpi_device_id bt_device_ids[] = {@@ -122,7 +122,7 @@ static int toshiba_bt_rfkill_add(structreturn result; } -static int toshiba_bt_rfkill_remove (struct acpi_device *device,int type) +static int toshiba_bt_rfkill_remove (struct acpi_device *device) {/* clean up */ return 0 ;Index:
linux-pm/drivers/platform/x86/wmi.c
===================================================================drivers/platform/x86/wmi.c +2
-2@@ -92,7 +92,7 @@ module_param(debug_dump_wdg, bool, 0444)MODULE_PARM_DESC (debug_dump_wdg,"Dump available WMI interfaces [0/1]" ); -static int acpi_wmi_remove (struct acpi_device *device,int type); +static int acpi_wmi_remove (struct acpi_device *device);static int acpi_wmi_add (struct acpi_device *device);static void acpi_wmi_notify (struct acpi_device *device,u32 event);@@ -917,7 +917,7 @@ static void acpi_wmi_notify(struct acpi_ } } -static int acpi_wmi_remove (struct acpi_device *device,int type) +static int acpi_wmi_remove (struct acpi_device *device) {acpi_remove_address_space_handler (device->handle,ACPI_ADR_SPACE_EC , &acpi_wmi_ec_space_handler);Index:
linux-pm/drivers/platform/x86/xo15-ebook.c
===================================================================drivers/platform/x86/xo15-ebook.c +1
-1@@ -150,7 +150,7 @@ static int ebook_switch_add(struct acpi_return error; } -static int ebook_switch_remove (struct acpi_device *device,int type) +static int ebook_switch_remove (struct acpi_device *device) {struct ebook_switch *button =acpi_driver_data (device);Index:
linux-pm/drivers/staging/quickstart/quickstart.c
===================================================================drivers/staging/quickstart/quickstart.c +1
-1@@ -296,7 +296,7 @@ fail_config:return ret; } -static int quickstart_acpi_remove (struct acpi_device *device,int type) +static int quickstart_acpi_remove (struct acpi_device *device) {acpi_status status;struct quickstart_acpi *quickstart;Index:
linux-pm/drivers/video/backlight/apple_bl.c
===================================================================drivers/video/backlight/apple_bl.c +1
-1@@ -196,7 +196,7 @@ static int apple_bl_add(struct acpi_devireturn 0 ; } -static int apple_bl_remove (struct acpi_device *dev,int type) +static int apple_bl_remove (struct acpi_device *dev) {backlight_device_unregister (apple_backlight_device);Index:
linux-pm/drivers/xen/xen-acpi-pad.c
===================================================================drivers/xen/xen-acpi-pad.c +1
-3@@ -140,8 +140,7 @@ static int acpi_pad_add(struct acpi_devireturn 0 ; } -static int acpi_pad_remove (struct acpi_device *device, -int type) +static int acpi_pad_remove (struct acpi_device *device) {mutex_lock (&xen_cpu_lock);xen_acpi_pad_idle_cpus (0 ); --To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
Quoted 9 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
The second argument of ACPI driver .remove() operation is only used by the ACPI processor driver and the value passed to that driver through it is always available from the given struct
acpi_deviceobject'sremoval_typefield. For this reason, the second ACPI driver .remove() argument is in fact useless, so drop it.Signed-off-by Rafael J. Wysocki <[email protected]>
Thanks for the clean-up! It looks good.
-Toshi
Quoted 9 lines · Toshi Kani
Quoted 8 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
The second argument of ACPI driver .remove() operation is only used by the ACPI processor driver and the value passed to that driver through it is always available from the given struct
acpi_deviceobject'sremoval_typefield. For this reason, the second ACPI driver .remove() argument is in fact useless, so drop it.
Quoted 5 lines
Quoted 1 line
Signed-off-by Rafael J. Wysocki <[email protected]>Thanks for the clean-up! It looks good.
Acked-by Toshi Kani <[email protected]>
Thanks!
Rafael
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.