Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7397ff81 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

power: smb135x-charger: fix the type of dc_psy_type



The driver uses enum to track whether dc_psy_type is valid. It sets
it to -EINVAL if its not valid. However, enums are unsigned integers
and checking it against negative values is always going to fail. Fix
this by changing the type to an integer.

Change-Id: Icb8a23a1b4660503f68edf6cdcca7d39c1ebfcb2
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 416e5ce5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -274,7 +274,7 @@ struct smb135x_chg {
	struct power_supply		batt_psy;
	struct power_supply		dc_psy;
	struct power_supply		*bms_psy;
	enum power_supply_type		dc_psy_type;
	int				dc_psy_type;
	int				dc_psy_ma;
	const char			*bms_psy_name;