hwmon: (raspberrypi) Fix initial notify
authorStefan Wahren <stefan.wahren@i2se.com>
Sun, 11 Nov 2018 12:01:11 +0000 (13:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 08:24:31 +0000 (09:24 +0100)
commitdbc62bd3b05b772989de64421573f25552f5aead
tree5b88fe7cfe16d2ca9ffcf8880619131256dce5de
parent08cff35113e5ca6378b394a3566a4c7c86737bf2
hwmon: (raspberrypi) Fix initial notify

[ Upstream commit 35fdc3902179366489a12cae4cb3ccc3b95f0afe ]

In case an under-voltage happens before probing the driver wont
write the critical warning into the kernel log. So don't init
of last_throttled during probe and fix this issue.

Fixes: 74d1e007915f ("hwmon: Add support for RPi voltage sensor")
Reported-by: "Noralf Trønnes" <noralf@tronnes.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/raspberrypi-hwmon.c