You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ACPI: Remove useless type argument of driver .remove() operation
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. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Jiang Liu <jiang.liu@huawei.com> Acked-by: Toshi Kani <toshi.kani@hp.com> Acked-by: Yinghai Lu <yinghai@kernel.org>
This commit is contained in:
@@ -191,7 +191,7 @@ static int aml_nfw_add(struct acpi_device *device)
|
||||
return aml_nfw_add_global_handler();
|
||||
}
|
||||
|
||||
static int aml_nfw_remove(struct acpi_device *device, int type)
|
||||
static int aml_nfw_remove(struct acpi_device *device)
|
||||
{
|
||||
return aml_nfw_remove_global_handler();
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ err_sysfs:
|
||||
return r;
|
||||
}
|
||||
|
||||
static int xo15_sci_remove(struct acpi_device *device, int type)
|
||||
static int xo15_sci_remove(struct acpi_device *device)
|
||||
{
|
||||
acpi_disable_gpe(NULL, xo15_sci_gpe);
|
||||
acpi_remove_gpe_handler(NULL, xo15_sci_gpe, xo15_sci_gpe_handler);
|
||||
|
||||
+2
-2
@@ -60,7 +60,7 @@ static int acpi_ac_open_fs(struct inode *inode, struct file *file);
|
||||
#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 *dev)
|
||||
}
|
||||
#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;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ MODULE_LICENSE("GPL");
|
||||
#define MEMORY_POWER_OFF_STATE 2
|
||||
|
||||
static 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(struct acpi_device *device)
|
||||
return 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;
|
||||
|
||||
@@ -482,8 +482,7 @@ static int acpi_pad_add(struct acpi_device *device)
|
||||
return 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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ static const struct acpi_device_id button_device_ids[] = {
|
||||
MODULE_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_device *device)
|
||||
return 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);
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ MODULE_DESCRIPTION("ACPI container driver");
|
||||
MODULE_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 acpi_device *device)
|
||||
return 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;
|
||||
|
||||
+1
-1
@@ -852,7 +852,7 @@ static int acpi_ec_add(struct acpi_device *device)
|
||||
return 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;
|
||||
|
||||
+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_device *device)
|
||||
return 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);
|
||||
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ static int acpi_hed_add(struct acpi_device *device)
|
||||
return 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;
|
||||
|
||||
@@ -54,7 +54,7 @@ ACPI_MODULE_NAME("pci_link");
|
||||
#define ACPI_PCI_LINK_MAX_POSSIBLE 16
|
||||
|
||||
static 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;
|
||||
|
||||
|
||||
@@ -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 \
|
||||
@@ -627,7 +627,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;
|
||||
|
||||
@@ -81,7 +81,7 @@ MODULE_DESCRIPTION("ACPI Processor Driver");
|
||||
MODULE_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(struct acpi_device *device, int type)
|
||||
if (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;
|
||||
}
|
||||
|
||||
+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_device *device)
|
||||
acpi_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;
|
||||
|
||||
@@ -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 acpi_device *device)
|
||||
|
||||
extern 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;
|
||||
|
||||
|
||||
+2
-3
@@ -577,8 +577,7 @@ static int acpi_device_probe(struct device * dev)
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -600,7 +599,7 @@ static int acpi_device_remove(struct device * dev)
|
||||
if (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;
|
||||
|
||||
@@ -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[] = {
|
||||
@@ -1111,7 +1111,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;
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ module_param(use_bios_initial_backlight, bool, 0644);
|
||||
|
||||
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 acpi_device *device)
|
||||
return 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;
|
||||
|
||||
|
||||
+1
-1
@@ -1041,7 +1041,7 @@ static int hpet_acpi_add(struct acpi_device *device)
|
||||
return 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;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user