浏览代码

hwmon: (raspberrypi) Fix initial notify

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>
Stefan Wahren 6 年之前
父节点
当前提交
35fdc39021
共有 1 个文件被更改,包括 0 次插入6 次删除
  1. 0 6
      drivers/hwmon/raspberrypi-hwmon.c

+ 0 - 6
drivers/hwmon/raspberrypi-hwmon.c

@@ -115,7 +115,6 @@ static int rpi_hwmon_probe(struct platform_device *pdev)
 {
 {
 	struct device *dev = &pdev->dev;
 	struct device *dev = &pdev->dev;
 	struct rpi_hwmon_data *data;
 	struct rpi_hwmon_data *data;
-	int ret;
 
 
 	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
 	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
 	if (!data)
 	if (!data)
@@ -124,11 +123,6 @@ static int rpi_hwmon_probe(struct platform_device *pdev)
 	/* Parent driver assure that firmware is correct */
 	/* Parent driver assure that firmware is correct */
 	data->fw = dev_get_drvdata(dev->parent);
 	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->hwmon_dev = devm_hwmon_device_register_with_info(dev, "rpi_volt",
 							       data,
 							       data,
 							       &rpi_chip_info,
 							       &rpi_chip_info,