mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +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
1 changed files with 14 additions and 16 deletions
|
@ -536,8 +536,7 @@ struct acpi_buffer *result)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static acpi_status AMW0_get_u32(u32 *value, u32 cap,
|
static acpi_status AMW0_get_u32(u32 *value, u32 cap)
|
||||||
struct wmi_interface *iface)
|
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
u8 result;
|
u8 result;
|
||||||
|
@ -607,7 +606,7 @@ struct wmi_interface *iface)
|
||||||
return AE_OK;
|
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;
|
struct wmab_args args;
|
||||||
|
|
||||||
|
@ -827,8 +826,7 @@ WMI_execute_u32(u32 method_id, u32 in, u32 *out)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static acpi_status WMID_get_u32(u32 *value, u32 cap,
|
static acpi_status WMID_get_u32(u32 *value, u32 cap)
|
||||||
struct wmi_interface *iface)
|
|
||||||
{
|
{
|
||||||
acpi_status status;
|
acpi_status status;
|
||||||
u8 tmp;
|
u8 tmp;
|
||||||
|
@ -864,7 +862,7 @@ struct wmi_interface *iface)
|
||||||
return status;
|
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;
|
u32 method_id = 0;
|
||||||
char param;
|
char param;
|
||||||
|
@ -1154,15 +1152,15 @@ static acpi_status get_u32(u32 *value, u32 cap)
|
||||||
|
|
||||||
switch (interface->type) {
|
switch (interface->type) {
|
||||||
case ACER_AMW0:
|
case ACER_AMW0:
|
||||||
status = AMW0_get_u32(value, cap, interface);
|
status = AMW0_get_u32(value, cap);
|
||||||
break;
|
break;
|
||||||
case ACER_AMW0_V2:
|
case ACER_AMW0_V2:
|
||||||
if (cap == ACER_CAP_MAILLED) {
|
if (cap == ACER_CAP_MAILLED) {
|
||||||
status = AMW0_get_u32(value, cap, interface);
|
status = AMW0_get_u32(value, cap);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ACER_WMID:
|
case ACER_WMID:
|
||||||
status = WMID_get_u32(value, cap, interface);
|
status = WMID_get_u32(value, cap);
|
||||||
break;
|
break;
|
||||||
case ACER_WMID_v2:
|
case ACER_WMID_v2:
|
||||||
if (cap & (ACER_CAP_WIRELESS |
|
if (cap & (ACER_CAP_WIRELESS |
|
||||||
|
@ -1170,7 +1168,7 @@ static acpi_status get_u32(u32 *value, u32 cap)
|
||||||
ACER_CAP_THREEG))
|
ACER_CAP_THREEG))
|
||||||
status = wmid_v2_get_u32(value, cap);
|
status = wmid_v2_get_u32(value, cap);
|
||||||
else if (wmi_has_guid(WMID_GUID2))
|
else if (wmi_has_guid(WMID_GUID2))
|
||||||
status = WMID_get_u32(value, cap, interface);
|
status = WMID_get_u32(value, cap);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1184,10 +1182,10 @@ static acpi_status set_u32(u32 value, u32 cap)
|
||||||
if (interface->capability & cap) {
|
if (interface->capability & cap) {
|
||||||
switch (interface->type) {
|
switch (interface->type) {
|
||||||
case ACER_AMW0:
|
case ACER_AMW0:
|
||||||
return AMW0_set_u32(value, cap, interface);
|
return AMW0_set_u32(value, cap);
|
||||||
case ACER_AMW0_V2:
|
case ACER_AMW0_V2:
|
||||||
if (cap == ACER_CAP_MAILLED)
|
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
|
* 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 ||
|
if (cap == ACER_CAP_WIRELESS ||
|
||||||
cap == ACER_CAP_BLUETOOTH) {
|
cap == ACER_CAP_BLUETOOTH) {
|
||||||
status = WMID_set_u32(value, cap, interface);
|
status = WMID_set_u32(value, cap);
|
||||||
if (ACPI_FAILURE(status))
|
if (ACPI_FAILURE(status))
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
return AMW0_set_u32(value, cap, interface);
|
return AMW0_set_u32(value, cap);
|
||||||
}
|
}
|
||||||
case ACER_WMID:
|
case ACER_WMID:
|
||||||
return WMID_set_u32(value, cap, interface);
|
return WMID_set_u32(value, cap);
|
||||||
case ACER_WMID_v2:
|
case ACER_WMID_v2:
|
||||||
if (cap & (ACER_CAP_WIRELESS |
|
if (cap & (ACER_CAP_WIRELESS |
|
||||||
ACER_CAP_BLUETOOTH |
|
ACER_CAP_BLUETOOTH |
|
||||||
ACER_CAP_THREEG))
|
ACER_CAP_THREEG))
|
||||||
return wmid_v2_set_u32(value, cap);
|
return wmid_v2_set_u32(value, cap);
|
||||||
else if (wmi_has_guid(WMID_GUID2))
|
else if (wmi_has_guid(WMID_GUID2))
|
||||||
return WMID_set_u32(value, cap, interface);
|
return WMID_set_u32(value, cap);
|
||||||
default:
|
default:
|
||||||
return AE_BAD_PARAMETER;
|
return AE_BAD_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue