Commit 77f4b9fe050d59a30c3b11e267289630bb13f56a
Committed by
Anton Vorontsov
1 parent
d1b113bb02
Exists in
master
and in
39 other branches
intel_pmic_battery: Fix battery charging status on mrst
The arguments got swapped on some functions which produces undefined results. The main one got fixed before submit but the other two were missed. Signed-off-by: Shuduo Sang <shuduo.sang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
drivers/power/intel_mid_battery.c
... | ... | @@ -185,8 +185,8 @@ |
185 | 185 | { |
186 | 186 | u32 data[3]; |
187 | 187 | u8 *p = (u8 *)&data[1]; |
188 | - int err = intel_scu_ipc_command(IPC_CMD_BATTERY_PROPERTY, | |
189 | - IPCMSG_BATTERY, NULL, 0, data, 3); | |
188 | + int err = intel_scu_ipc_command(IPCMSG_BATTERY, | |
189 | + IPC_CMD_BATTERY_PROPERTY, NULL, 0, data, 3); | |
190 | 190 | |
191 | 191 | prop->capacity = data[0]; |
192 | 192 | prop->crnt = *p++; |
... | ... | @@ -207,7 +207,7 @@ |
207 | 207 | |
208 | 208 | static int pmic_scu_ipc_set_charger(int charger) |
209 | 209 | { |
210 | - return intel_scu_ipc_simple_command(charger, IPCMSG_BATTERY); | |
210 | + return intel_scu_ipc_simple_command(IPCMSG_BATTERY, charger); | |
211 | 211 | } |
212 | 212 | |
213 | 213 | /** |