diff options
author | Luka Perkov <luka.perkov@sartura.hr> | 2016-06-23 13:57:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-23 13:57:21 +0200 |
commit | 282b917e47d9ae5017e1e426face9b75cb7aabd0 (patch) | |
tree | 3284ca2d20d9c8d7a4563c6446675c1ecf3feac2 /target/linux/brcm2708/patches-4.4/0247-bcm2835_thermal-Don-t-report-unsupported-trip-type.patch | |
parent | 34d432b05312de6d9575c559db8209809489096d (diff) | |
parent | 441a9c879ba6562ea9f431cf33bbb0c0400d5fd0 (diff) | |
download | master-187ad058-282b917e47d9ae5017e1e426face9b75cb7aabd0.tar.gz master-187ad058-282b917e47d9ae5017e1e426face9b75cb7aabd0.tar.bz2 master-187ad058-282b917e47d9ae5017e1e426face9b75cb7aabd0.zip |
Merge pull request #11 from wigyori/master
pull req for 4.4.12, ar71xx/mediatek updates, package upgrades
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0247-bcm2835_thermal-Don-t-report-unsupported-trip-type.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.4/0247-bcm2835_thermal-Don-t-report-unsupported-trip-type.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0247-bcm2835_thermal-Don-t-report-unsupported-trip-type.patch b/target/linux/brcm2708/patches-4.4/0247-bcm2835_thermal-Don-t-report-unsupported-trip-type.patch new file mode 100644 index 0000000000..ab578a473d --- /dev/null +++ b/target/linux/brcm2708/patches-4.4/0247-bcm2835_thermal-Don-t-report-unsupported-trip-type.patch @@ -0,0 +1,69 @@ +From 6877cb849fe4953be1c9f056a83e218e09948d38 Mon Sep 17 00:00:00 2001 +From: popcornmix <popcornmix@gmail.com> +Date: Tue, 19 Apr 2016 12:57:52 +0100 +Subject: [PATCH 247/381] bcm2835_thermal: Don't report unsupported trip type + +--- + drivers/thermal/bcm2835-thermal.c | 34 +--------------------------------- + 1 file changed, 1 insertion(+), 33 deletions(-) + +--- a/drivers/thermal/bcm2835-thermal.c ++++ b/drivers/thermal/bcm2835-thermal.c +@@ -49,38 +49,8 @@ static int bcm2835_thermal_get_temp(stru + RPI_FIRMWARE_GET_TEMPERATURE); + } + +-static int bcm2835_thermal_get_max_temp(struct thermal_zone_device *tz, +- int trip, int *temp) +-{ +- /* +- * The maximum safe temperature of the SoC. +- * Overclock may be disabled above this temperature. +- */ +- return bcm2835_thermal_get_property(tz, temp, +- RPI_FIRMWARE_GET_MAX_TEMPERATURE); +-} +- +-static int bcm2835_thermal_get_trip_type(struct thermal_zone_device *tz, +- int trip, enum thermal_trip_type *type) +-{ +- *type = THERMAL_TRIP_HOT; +- +- return 0; +-} +- +-static int bcm2835_thermal_get_mode(struct thermal_zone_device *tz, +- enum thermal_device_mode *mode) +-{ +- *mode = THERMAL_DEVICE_ENABLED; +- +- return 0; +-} +- + static struct thermal_zone_device_ops ops = { + .get_temp = bcm2835_thermal_get_temp, +- .get_trip_temp = bcm2835_thermal_get_max_temp, +- .get_trip_type = bcm2835_thermal_get_trip_type, +- .get_mode = bcm2835_thermal_get_mode, + }; + + static int bcm2835_thermal_probe(struct platform_device *pdev) +@@ -90,17 +60,15 @@ static int bcm2835_thermal_probe(struct + struct thermal_zone_device *tz; + + fw_np = of_parse_phandle(pdev->dev.of_node, "firmware", 0); +-/* Remove comment when booting without Device Tree is no longer supported + if (!fw_np) { + dev_err(&pdev->dev, "Missing firmware node\n"); + return -ENOENT; + } +-*/ + fw = rpi_firmware_get(fw_np); + if (!fw) + return -EPROBE_DEFER; + +- tz = thermal_zone_device_register("bcm2835_thermal", 1, 0, fw, &ops, ++ tz = thermal_zone_device_register("bcm2835_thermal", 0, 0, fw, &ops, + NULL, 0, 0); + if (IS_ERR(tz)) { + dev_err(&pdev->dev, "Failed to register the thermal device\n"); |