[PATCH] mfd: pca9450: don't warn if PCA9450_PWRON_STAT is 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The register is zeroed on read, so network booting always prints the
warning that the reset reason is unknown.

Skip the warning in this case.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 drivers/mfd/pca9450.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mfd/pca9450.c b/drivers/mfd/pca9450.c
index be357c10239f..89eca9f890e3 100644
--- a/drivers/mfd/pca9450.c
+++ b/drivers/mfd/pca9450.c
@@ -53,6 +53,8 @@ static int pca9450_get_reset_source(struct device *dev, struct regmap *map)
 		break;
 	default:
 		dev_warn(dev, "Unknown reset reason: 0x%02x\n", reg);
+		fallthrough;
+	case 0:
 		type = RESET_UKWN;
 	}
 
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux