aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86
diff options
context:
space:
mode:
authorLee, Chun-Yi <jlee@suse.com>2012-01-09 01:26:44 -0500
committerMatthew Garrett <mjg@redhat.com>2012-03-20 12:02:21 -0400
commit38db157d7b52a34be3e059d0bfa8ea9c9086105f (patch)
tree6ef0e9abb04e9b0e62077e4a958c2c247df296ce /drivers/platform/x86
parent984165a37ca65d990419566d9af5dd247d03d2a0 (diff)
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>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r--drivers/platform/x86/acer-wmi.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 6cd2289dd5d3..7203e060d64d 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -536,8 +536,7 @@ struct acpi_buffer *result)
536 return status; 536 return status;
537} 537}
538 538
539static acpi_status AMW0_get_u32(u32 *value, u32 cap, 539static acpi_status AMW0_get_u32(u32 *value, u32 cap)
540struct wmi_interface *iface)
541{ 540{
542 int err; 541 int err;
543 u8 result; 542 u8 result;
@@ -607,7 +606,7 @@ struct wmi_interface *iface)
607 return AE_OK; 606 return AE_OK;
608} 607}
609 608
610static acpi_status AMW0_set_u32(u32 value, u32 cap, struct wmi_interface *iface) 609static acpi_status AMW0_set_u32(u32 value, u32 cap)
611{ 610{
612 struct wmab_args args; 611 struct wmab_args args;
613 612
@@ -827,8 +826,7 @@ WMI_execute_u32(u32 method_id, u32 in, u32 *out)
827 return status; 826 return status;
828} 827}
829 828
830static acpi_status WMID_get_u32(u32 *value, u32 cap, 829static acpi_status WMID_get_u32(u32 *value, u32 cap)
831struct wmi_interface *iface)
832{ 830{
833 acpi_status status; 831 acpi_status status;
834 u8 tmp; 832 u8 tmp;
@@ -864,7 +862,7 @@ struct wmi_interface *iface)
864 return status; 862 return status;
865} 863}
866 864
867static acpi_status WMID_set_u32(u32 value, u32 cap, struct wmi_interface *iface) 865static acpi_status WMID_set_u32(u32 value, u32 cap)
868{ 866{
869 u32 method_id = 0; 867 u32 method_id = 0;
870 char param; 868 char param;
@@ -1154,15 +1152,15 @@ static acpi_status get_u32(u32 *value, u32 cap)
1154 1152
1155 switch (interface->type) { 1153 switch (interface->type) {
1156 case ACER_AMW0: 1154 case ACER_AMW0:
1157 status = AMW0_get_u32(value, cap, interface); 1155 status = AMW0_get_u32(value, cap);
1158 break; 1156 break;
1159 case ACER_AMW0_V2: 1157 case ACER_AMW0_V2:
1160 if (cap == ACER_CAP_MAILLED) { 1158 if (cap == ACER_CAP_MAILLED) {
1161 status = AMW0_get_u32(value, cap, interface); 1159 status = AMW0_get_u32(value, cap);
1162 break; 1160 break;
1163 } 1161 }
1164 case ACER_WMID: 1162 case ACER_WMID:
1165 status = WMID_get_u32(value, cap, interface); 1163 status = WMID_get_u32(value, cap);
1166 break; 1164 break;
1167 case ACER_WMID_v2: 1165 case ACER_WMID_v2:
1168 if (cap & (ACER_CAP_WIRELESS | 1166 if (cap & (ACER_CAP_WIRELESS |
@@ -1170,7 +1168,7 @@ static acpi_status get_u32(u32 *value, u32 cap)
1170 ACER_CAP_THREEG)) 1168 ACER_CAP_THREEG))
1171 status = wmid_v2_get_u32(value, cap); 1169 status = wmid_v2_get_u32(value, cap);
1172 else if (wmi_has_guid(WMID_GUID2)) 1170 else if (wmi_has_guid(WMID_GUID2))
1173 status = WMID_get_u32(value, cap, interface); 1171 status = WMID_get_u32(value, cap);
1174 break; 1172 break;
1175 } 1173 }
1176 1174
@@ -1184,10 +1182,10 @@ static acpi_status set_u32(u32 value, u32 cap)
1184 if (interface->capability & cap) { 1182 if (interface->capability & cap) {
1185 switch (interface->type) { 1183 switch (interface->type) {
1186 case ACER_AMW0: 1184 case ACER_AMW0:
1187 return AMW0_set_u32(value, cap, interface); 1185 return AMW0_set_u32(value, cap);
1188 case ACER_AMW0_V2: 1186 case ACER_AMW0_V2:
1189 if (cap == ACER_CAP_MAILLED) 1187 if (cap == ACER_CAP_MAILLED)
1190 return AMW0_set_u32(value, cap, interface); 1188 return AMW0_set_u32(value, cap);
1191 1189
1192 /* 1190 /*
1193 * On some models, some WMID methods don't toggle 1191 * On some models, some WMID methods don't toggle
@@ -1197,21 +1195,21 @@ static acpi_status set_u32(u32 value, u32 cap)
1197 */ 1195 */
1198 if (cap == ACER_CAP_WIRELESS || 1196 if (cap == ACER_CAP_WIRELESS ||
1199 cap == ACER_CAP_BLUETOOTH) { 1197 cap == ACER_CAP_BLUETOOTH) {
1200 status = WMID_set_u32(value, cap, interface); 1198 status = WMID_set_u32(value, cap);
1201 if (ACPI_FAILURE(status)) 1199 if (ACPI_FAILURE(status))
1202 return status; 1200 return status;
1203 1201
1204 return AMW0_set_u32(value, cap, interface); 1202 return AMW0_set_u32(value, cap);
1205 } 1203 }
1206 case ACER_WMID: 1204 case ACER_WMID:
1207 return WMID_set_u32(value, cap, interface); 1205 return WMID_set_u32(value, cap);
1208 case ACER_WMID_v2: 1206 case ACER_WMID_v2:
1209 if (cap & (ACER_CAP_WIRELESS | 1207 if (cap & (ACER_CAP_WIRELESS |
1210 ACER_CAP_BLUETOOTH | 1208 ACER_CAP_BLUETOOTH |
1211 ACER_CAP_THREEG)) 1209 ACER_CAP_THREEG))
1212 return wmid_v2_set_u32(value, cap); 1210 return wmid_v2_set_u32(value, cap);
1213 else if (wmi_has_guid(WMID_GUID2)) 1211 else if (wmi_has_guid(WMID_GUID2))
1214 return WMID_set_u32(value, cap, interface); 1212 return WMID_set_u32(value, cap);
1215 default: 1213 default:
1216 return AE_BAD_PARAMETER; 1214 return AE_BAD_PARAMETER;
1217 } 1215 }