|
13 | 13 |
|
14 | 14 | #include "thermal_core.h"
|
15 | 15 |
|
| 16 | +enum thermal_genl_multicast_groups { |
| 17 | + THERMAL_GENL_SAMPLING_GROUP = 0, |
| 18 | + THERMAL_GENL_EVENT_GROUP = 1, |
| 19 | +}; |
| 20 | + |
16 | 21 | static const struct genl_multicast_group thermal_genl_mcgrps[] = {
|
17 |
| - { .name = THERMAL_GENL_SAMPLING_GROUP_NAME, }, |
18 |
| - { .name = THERMAL_GENL_EVENT_GROUP_NAME, }, |
| 22 | + [THERMAL_GENL_SAMPLING_GROUP] = { .name = THERMAL_GENL_SAMPLING_GROUP_NAME, }, |
| 23 | + [THERMAL_GENL_EVENT_GROUP] = { .name = THERMAL_GENL_EVENT_GROUP_NAME, }, |
19 | 24 | };
|
20 | 25 |
|
21 | 26 | static const struct nla_policy thermal_genl_policy[THERMAL_GENL_ATTR_MAX + 1] = {
|
@@ -95,7 +100,7 @@ int thermal_genl_sampling_temp(int id, int temp)
|
95 | 100 |
|
96 | 101 | genlmsg_end(skb, hdr);
|
97 | 102 |
|
98 |
| - genlmsg_multicast(&thermal_gnl_family, skb, 0, 0, GFP_KERNEL); |
| 103 | + genlmsg_multicast(&thermal_gnl_family, skb, 0, THERMAL_GENL_SAMPLING_GROUP, GFP_KERNEL); |
99 | 104 |
|
100 | 105 | return 0;
|
101 | 106 | out_cancel:
|
@@ -290,7 +295,7 @@ static int thermal_genl_send_event(enum thermal_genl_event event,
|
290 | 295 |
|
291 | 296 | genlmsg_end(msg, hdr);
|
292 | 297 |
|
293 |
| - genlmsg_multicast(&thermal_gnl_family, msg, 0, 1, GFP_KERNEL); |
| 298 | + genlmsg_multicast(&thermal_gnl_family, msg, 0, THERMAL_GENL_EVENT_GROUP, GFP_KERNEL); |
294 | 299 |
|
295 | 300 | return 0;
|
296 | 301 |
|
|
0 commit comments