summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSai Gurrappadi <sgurrappadi@nvidia.com>2013-10-28 11:27:01 -0700
committerDiwakar Tundlam <dtundlam@nvidia.com>2013-11-15 16:33:46 -0800
commit45417f234238d912f28ab5bda1498021e668dc1a (patch)
tree89366d1f2a5c2756d26cee0ee8f112846898f12f
parent40144a3f7eda1c20cc2522734da069cafb211e29 (diff)
Thermal: Add temperature to thermal netlink event
Let the thermal netlink event carry temperature along with the payload. Change-Id: I978371388344d0d2568b9a955984055eb0afbd07 Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/332010 Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
-rw-r--r--drivers/thermal/thermal_core.c3
-rw-r--r--include/linux/thermal.h5
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 4439083a0a8e..81c306466ea5 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -2035,7 +2035,7 @@ static struct genl_multicast_group thermal_event_mcgrp = {
};
int thermal_generate_netlink_event(struct thermal_zone_device *tz,
- enum events event)
+ enum events event, int temp)
{
struct sk_buff *skb;
struct nlattr *attr;
@@ -2084,6 +2084,7 @@ int thermal_generate_netlink_event(struct thermal_zone_device *tz,
thermal_event->orig = tz->id;
thermal_event->event = event;
+ thermal_event->temp = temp;
/* send multicast genetlink message */
result = genlmsg_end(skb, msg_header);
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index c10da602d865..bb5c44040f24 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -233,6 +233,7 @@ struct thermal_zone_params {
struct thermal_genl_event {
u32 orig;
enum events event;
+ int temp;
};
/* Function declarations */
@@ -265,10 +266,10 @@ void thermal_notify_framework(struct thermal_zone_device *, int);
#ifdef CONFIG_NET
extern int thermal_generate_netlink_event(struct thermal_zone_device *tz,
- enum events event);
+ enum events event, int temp);
#else
static inline int thermal_generate_netlink_event(struct thermal_zone_device *tz,
- enum events event)
+ enum events event, int temp)
{
return 0;
}