Prechádzať zdrojové kódy

Merge "ASoC: wsa881x: Update temperature value during device down"

Linux Build Service Account 6 rokov pred
rodič
commit
aa9c44a396
1 zmenil súbory, kde vykonal 5 pridanie a 3 odobranie
  1. 5 3
      asoc/codecs/wsa881x-temp-sensor.c

+ 5 - 3
asoc/codecs/wsa881x-temp-sensor.c

@@ -80,9 +80,11 @@ temp_retry:
 	if (pdata->wsa_temp_reg_read) {
 		ret = pdata->wsa_temp_reg_read(codec, &reg);
 		if (ret) {
-			pr_err("%s: temperature register read failed: %d\n",
-				__func__, ret);
-			return ret;
+			pr_err("%s: temp read failed: %d, current temp: %d\n",
+				__func__, ret, pdata->curr_temp);
+			if (temp)
+				*temp = pdata->curr_temp;
+			return 0;
 		}
 	} else {
 		pr_err("%s: wsa_temp_reg_read is NULL\n", __func__);