summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorStefan Wahren <stefan.wahren@i2se.com>2018-11-11 13:01:11 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-17 09:24:31 +0100
commitdbc62bd3b05b772989de64421573f25552f5aead (patch)
tree5b88fe7cfe16d2ca9ffcf8880619131256dce5de /drivers/hwmon
parent08cff35113e5ca6378b394a3566a4c7c86737bf2 (diff)
downloadlinux-stable-dbc62bd3b05b772989de64421573f25552f5aead.tar.gz
linux-stable-dbc62bd3b05b772989de64421573f25552f5aead.tar.bz2
linux-stable-dbc62bd3b05b772989de64421573f25552f5aead.zip
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>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/raspberrypi-hwmon.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/hwmon/raspberrypi-hwmon.c b/drivers/hwmon/raspberrypi-hwmon.c
index be5ba4690895..0d0457245e7d 100644
--- a/drivers/hwmon/raspberrypi-hwmon.c
+++ b/drivers/hwmon/raspberrypi-hwmon.c
@@ -115,7 +115,6 @@ static int rpi_hwmon_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct rpi_hwmon_data *data;
- int ret;
data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
if (!data)
@@ -124,11 +123,6 @@ static int rpi_hwmon_probe(struct platform_device *pdev)
/* Parent driver assure that firmware is correct */
data->fw = dev_get_drvdata(dev->parent);
- /* Init throttled */
- ret = rpi_firmware_property(data->fw, RPI_FIRMWARE_GET_THROTTLED,
- &data->last_throttled,
- sizeof(data->last_throttled));
-
data->hwmon_dev = devm_hwmon_device_register_with_info(dev, "rpi_volt",
data,
&rpi_chip_info,