Skip to content

Commit

Permalink
power: supply: surface-charger: Fix type of integer variable
Browse files Browse the repository at this point in the history
[ Upstream commit 601423b ]

The ac->state field is __le32, not u32. So change the variable we're
temporarily storing it in to __le32 as well.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: e61ffb3 ("power: supply: Add AC driver for Surface Aggregator Module")
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
qzed authored and gregkh committed Jul 20, 2021
1 parent 10d79d3 commit 8fcb25a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/supply/surface_charger.c
Expand Up @@ -66,7 +66,7 @@ struct spwr_ac_device {

static int spwr_ac_update_unlocked(struct spwr_ac_device *ac)
{
u32 old = ac->state;
__le32 old = ac->state;
int status;

lockdep_assert_held(&ac->lock);
Expand Down

0 comments on commit 8fcb25a

Please sign in to comment.