brcm2708: update linux 4.4 patches to latest version
[oweals/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0247-bcm2835_thermal-Don-t-report-unsupported-trip-type.patch
1 From 39f86135e9808c9e037f3bf98893af63d9777c6a Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Tue, 19 Apr 2016 12:57:52 +0100
4 Subject: [PATCH] bcm2835_thermal: Don't report unsupported trip type
5
6 ---
7  drivers/thermal/bcm2835-thermal.c | 34 +---------------------------------
8  1 file changed, 1 insertion(+), 33 deletions(-)
9
10 --- a/drivers/thermal/bcm2835-thermal.c
11 +++ b/drivers/thermal/bcm2835-thermal.c
12 @@ -49,38 +49,8 @@ static int bcm2835_thermal_get_temp(stru
13                                             RPI_FIRMWARE_GET_TEMPERATURE);
14  }
15  
16 -static int bcm2835_thermal_get_max_temp(struct thermal_zone_device *tz,
17 -                                       int trip, int *temp)
18 -{
19 -       /*
20 -        * The maximum safe temperature of the SoC.
21 -        * Overclock may be disabled above this temperature.
22 -        */
23 -       return bcm2835_thermal_get_property(tz, temp,
24 -                                           RPI_FIRMWARE_GET_MAX_TEMPERATURE);
25 -}
26 -
27 -static int bcm2835_thermal_get_trip_type(struct thermal_zone_device *tz,
28 -                                        int trip, enum thermal_trip_type *type)
29 -{
30 -       *type = THERMAL_TRIP_HOT;
31 -
32 -       return 0;
33 -}
34 -
35 -static int bcm2835_thermal_get_mode(struct thermal_zone_device *tz,
36 -                                   enum thermal_device_mode *mode)
37 -{
38 -       *mode = THERMAL_DEVICE_ENABLED;
39 -
40 -       return 0;
41 -}
42 -
43  static struct thermal_zone_device_ops ops  = {
44         .get_temp = bcm2835_thermal_get_temp,
45 -       .get_trip_temp = bcm2835_thermal_get_max_temp,
46 -       .get_trip_type = bcm2835_thermal_get_trip_type,
47 -       .get_mode = bcm2835_thermal_get_mode,
48  };
49  
50  static int bcm2835_thermal_probe(struct platform_device *pdev)
51 @@ -90,17 +60,15 @@ static int bcm2835_thermal_probe(struct
52         struct thermal_zone_device *tz;
53  
54         fw_np = of_parse_phandle(pdev->dev.of_node, "firmware", 0);
55 -/* Remove comment when booting without Device Tree is no longer supported
56         if (!fw_np) {
57                 dev_err(&pdev->dev, "Missing firmware node\n");
58                 return -ENOENT;
59         }
60 -*/
61         fw = rpi_firmware_get(fw_np);
62         if (!fw)
63                 return -EPROBE_DEFER;
64  
65 -       tz = thermal_zone_device_register("bcm2835_thermal", 1, 0, fw, &ops,
66 +       tz = thermal_zone_device_register("bcm2835_thermal", 0, 0, fw, &ops,
67                                           NULL, 0, 0);
68         if (IS_ERR(tz)) {
69                 dev_err(&pdev->dev, "Failed to register the thermal device\n");