Skip to content

Commit a61d832

Browse files
committed
chargecontrol fix by @ginkel
1 parent bbc873c commit a61d832

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tp_smapi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ static ssize_t store_battery_start_charge_thresh(struct device *dev,
779779

780780
down(&smapi_mutex);
781781
ret = get_thresh(bat, THRESH_STOP, &other_thresh);
782-
if (ret != -EOPNOTSUPP) {
782+
if (ret != -EOPNOTSUPP && ret != -ENXIO) {
783783
if (ret) /* other threshold is set? */
784784
goto out;
785785
ret = get_real_thresh(bat, THRESH_START, NULL);
@@ -821,7 +821,7 @@ static ssize_t store_battery_stop_charge_thresh(struct device *dev,
821821

822822
down(&smapi_mutex);
823823
ret = get_thresh(bat, THRESH_START, &other_thresh);
824-
if (ret != -EOPNOTSUPP) { /* other threshold exists? */
824+
if (ret != -EOPNOTSUPP && ret != -ENXIO) { /* other threshold exists? */
825825
if (ret)
826826
goto out;
827827
/* this threshold exists? */

0 commit comments

Comments
 (0)