mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 22:51:35 +00:00
acer-wmi: remove useless input argument for internal wmi
The "wmi_interface *iface" is a useless input argument for internal wmi get/set functions, remove it to clear up source code. Tested on Lenovo E520. Tested on Acer TravelMate 4750. Tested-by: mr.kobzar <mr.kobzar@gmail.com> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
This commit is contained in:
parent
984165a37c
commit
38db157d7b
@ -536,8 +536,7 @@ struct acpi_buffer *result)
|
||||
return status;
|
||||
}
|
||||
|
||||
static acpi_status AMW0_get_u32(u32 *value, u32 cap,
|
||||
struct wmi_interface *iface)
|
||||
static acpi_status AMW0_get_u32(u32 *value, u32 cap)
|
||||
{
|
||||
int err;
|
||||
u8 result;
|
||||
@ -607,7 +606,7 @@ struct wmi_interface *iface)
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
static acpi_status AMW0_set_u32(u32 value, u32 cap, struct wmi_interface *iface)
|
||||
static acpi_status AMW0_set_u32(u32 value, u32 cap)
|
||||
{
|
||||
struct wmab_args args;
|
||||
|
||||
@ -827,8 +826,7 @@ WMI_execute_u32(u32 method_id, u32 in, u32 *out)
|
||||
return status;
|
||||
}
|
||||
|
||||
static acpi_status WMID_get_u32(u32 *value, u32 cap,
|
||||
struct wmi_interface *iface)
|
||||
static acpi_status WMID_get_u32(u32 *value, u32 cap)
|
||||
{
|
||||
acpi_status status;
|
||||
u8 tmp;
|
||||
@ -864,7 +862,7 @@ struct wmi_interface *iface)
|
||||
return status;
|
||||
}
|
||||
|
||||
static acpi_status WMID_set_u32(u32 value, u32 cap, struct wmi_interface *iface)
|
||||
static acpi_status WMID_set_u32(u32 value, u32 cap)
|
||||
{
|
||||
u32 method_id = 0;
|
||||
char param;
|
||||
@ -1154,15 +1152,15 @@ static acpi_status get_u32(u32 *value, u32 cap)
|
||||
|
||||
switch (interface->type) {
|
||||
case ACER_AMW0:
|
||||
status = AMW0_get_u32(value, cap, interface);
|
||||
status = AMW0_get_u32(value, cap);
|
||||
break;
|
||||
case ACER_AMW0_V2:
|
||||
if (cap == ACER_CAP_MAILLED) {
|
||||
status = AMW0_get_u32(value, cap, interface);
|
||||
status = AMW0_get_u32(value, cap);
|
||||
break;
|
||||
}
|
||||
case ACER_WMID:
|
||||
status = WMID_get_u32(value, cap, interface);
|
||||
status = WMID_get_u32(value, cap);
|
||||
break;
|
||||
case ACER_WMID_v2:
|
||||
if (cap & (ACER_CAP_WIRELESS |
|
||||
@ -1170,7 +1168,7 @@ static acpi_status get_u32(u32 *value, u32 cap)
|
||||
ACER_CAP_THREEG))
|
||||
status = wmid_v2_get_u32(value, cap);
|
||||
else if (wmi_has_guid(WMID_GUID2))
|
||||
status = WMID_get_u32(value, cap, interface);
|
||||
status = WMID_get_u32(value, cap);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1184,10 +1182,10 @@ static acpi_status set_u32(u32 value, u32 cap)
|
||||
if (interface->capability & cap) {
|
||||
switch (interface->type) {
|
||||
case ACER_AMW0:
|
||||
return AMW0_set_u32(value, cap, interface);
|
||||
return AMW0_set_u32(value, cap);
|
||||
case ACER_AMW0_V2:
|
||||
if (cap == ACER_CAP_MAILLED)
|
||||
return AMW0_set_u32(value, cap, interface);
|
||||
return AMW0_set_u32(value, cap);
|
||||
|
||||
/*
|
||||
* On some models, some WMID methods don't toggle
|
||||
@ -1197,21 +1195,21 @@ static acpi_status set_u32(u32 value, u32 cap)
|
||||
*/
|
||||
if (cap == ACER_CAP_WIRELESS ||
|
||||
cap == ACER_CAP_BLUETOOTH) {
|
||||
status = WMID_set_u32(value, cap, interface);
|
||||
status = WMID_set_u32(value, cap);
|
||||
if (ACPI_FAILURE(status))
|
||||
return status;
|
||||
|
||||
return AMW0_set_u32(value, cap, interface);
|
||||
return AMW0_set_u32(value, cap);
|
||||
}
|
||||
case ACER_WMID:
|
||||
return WMID_set_u32(value, cap, interface);
|
||||
return WMID_set_u32(value, cap);
|
||||
case ACER_WMID_v2:
|
||||
if (cap & (ACER_CAP_WIRELESS |
|
||||
ACER_CAP_BLUETOOTH |
|
||||
ACER_CAP_THREEG))
|
||||
return wmid_v2_set_u32(value, cap);
|
||||
else if (wmi_has_guid(WMID_GUID2))
|
||||
return WMID_set_u32(value, cap, interface);
|
||||
return WMID_set_u32(value, cap);
|
||||
default:
|
||||
return AE_BAD_PARAMETER;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user