power: supply: surface-charger: Fix type of integer variable
authorMaximilian Luz <luzmaximilian@gmail.com>
Tue, 11 May 2021 09:24:21 +0000 (11:24 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Thu, 3 Jun 2021 18:53:54 +0000 (20:53 +0200)
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: e61ffb344591 ("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>
drivers/power/supply/surface_charger.c

index 81a5b79822c9b60632366ab3b7f29514c65af1b5..a060c36c7766f84f488b52c0f050d4989ec9800e 100644 (file)
@@ -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);