Message ID | bug-215799-208809-nWSmZk9nPV@https.bugzilla.kernel.org/ (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [Bug,215799] apple-mfi-fastcharge causes automatic pm hibernation entry, when iPhone gets attached | expand |
diff --git a/usr/sbin/laptop_mode b/usr/sbin/laptop_mode index 5e2ef72..c4387ab 100755 --- a/usr/sbin/laptop_mode +++ b/usr/sbin/laptop_mode @@ -488,7 +488,7 @@ lmt_load_config () BATTERY_NOT_DISCHARGING=0 for POWER_SUPPLY in /sys/class/power_supply/* ; do if [ -f $POWER_SUPPLY/type ] ; then - SYSFS_POWER_SUPPLY=1 + SYSFS_POWER_SUPPLY=$(( SYSFS_POWER_SUPPLY + 1 )) if [ "$(cat $POWER_SUPPLY/type)" = "Mains" ]; then log "VERBOSE" "Determining power state from $POWER_SUPPLY/online."