thermal: streamline get_trend callbacks
authorSascha Hauer <s.hauer@pengutronix.de>
Fri, 22 Apr 2016 02:22:06 +0000 (10:22 +0800)
committerCaesar Wang <wxt@rock-chips.com>
Tue, 26 Apr 2016 02:35:59 +0000 (10:35 +0800)
commit2aaa7c70972f5ecb4124ab0b880d794f088f4976
tree468012ab11febc67ade8eb0b3b78b88c03a69f1a
parentd464660f056ca2f3a8beb4fd181b3eb08478884f
thermal: streamline get_trend callbacks

The .get_trend callback in struct thermal_zone_device_ops has the prototype:
        int (*get_trend) (struct thermal_zone_device *, int,
                          enum thermal_trend *);
whereas the .get_trend callback in struct thermal_zone_of_device_ops has:

        int (*get_trend)(void *, long *);

Streamline both prototypes and add the trip argument to the OF callback
aswell and use enum thermal_trend * instead of an integer pointer.

While the OF prototype may be the better one, this should be decided at
framework level and not on OF level.

Change-Id: I39c5a38a22c7a2177a35338bc63c8ba36983a7b0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
drivers/thermal/of-thermal.c
drivers/thermal/ti-soc-thermal/ti-thermal-common.c
include/linux/thermal.h