mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
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>
This commit is contained in:
parent
d1b113bb02
commit
77f4b9fe05
1 changed files with 3 additions and 3 deletions
|
@ -185,8 +185,8 @@ static int pmic_scu_ipc_battery_property_get(struct battery_property *prop)
|
|||
{
|
||||
u32 data[3];
|
||||
u8 *p = (u8 *)&data[1];
|
||||
int err = intel_scu_ipc_command(IPC_CMD_BATTERY_PROPERTY,
|
||||
IPCMSG_BATTERY, NULL, 0, data, 3);
|
||||
int err = intel_scu_ipc_command(IPCMSG_BATTERY,
|
||||
IPC_CMD_BATTERY_PROPERTY, NULL, 0, data, 3);
|
||||
|
||||
prop->capacity = data[0];
|
||||
prop->crnt = *p++;
|
||||
|
@ -207,7 +207,7 @@ static int pmic_scu_ipc_battery_property_get(struct battery_property *prop)
|
|||
|
||||
static int pmic_scu_ipc_set_charger(int charger)
|
||||
{
|
||||
return intel_scu_ipc_simple_command(charger, IPCMSG_BATTERY);
|
||||
return intel_scu_ipc_simple_command(IPCMSG_BATTERY, charger);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue