aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/event.c')
-rw-r--r--drivers/acpi/event.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c
index fdef416c0ff6..cae3b387b867 100644
--- a/drivers/acpi/event.c
+++ b/drivers/acpi/event.c
@@ -78,15 +78,17 @@ enum {
78#define ACPI_GENL_VERSION 0x01 78#define ACPI_GENL_VERSION 0x01
79#define ACPI_GENL_MCAST_GROUP_NAME "acpi_mc_group" 79#define ACPI_GENL_MCAST_GROUP_NAME "acpi_mc_group"
80 80
81static const struct genl_multicast_group acpi_event_mcgrps[] = {
82 { .name = ACPI_GENL_MCAST_GROUP_NAME, },
83};
84
81static struct genl_family acpi_event_genl_family = { 85static struct genl_family acpi_event_genl_family = {
82 .id = GENL_ID_GENERATE, 86 .id = GENL_ID_GENERATE,
83 .name = ACPI_GENL_FAMILY_NAME, 87 .name = ACPI_GENL_FAMILY_NAME,
84 .version = ACPI_GENL_VERSION, 88 .version = ACPI_GENL_VERSION,
85 .maxattr = ACPI_GENL_ATTR_MAX, 89 .maxattr = ACPI_GENL_ATTR_MAX,
86}; 90 .mcgrps = acpi_event_mcgrps,
87 91 .n_mcgrps = ARRAY_SIZE(acpi_event_mcgrps),
88static struct genl_multicast_group acpi_event_mcgrp = {
89 .name = ACPI_GENL_MCAST_GROUP_NAME,
90}; 92};
91 93
92int acpi_bus_generate_netlink_event(const char *device_class, 94int acpi_bus_generate_netlink_event(const char *device_class,
@@ -141,7 +143,7 @@ int acpi_bus_generate_netlink_event(const char *device_class,
141 return result; 143 return result;
142 } 144 }
143 145
144 genlmsg_multicast(skb, 0, acpi_event_mcgrp.id, GFP_ATOMIC); 146 genlmsg_multicast(&acpi_event_genl_family, skb, 0, 0, GFP_ATOMIC);
145 return 0; 147 return 0;
146} 148}
147 149
@@ -149,18 +151,7 @@ EXPORT_SYMBOL(acpi_bus_generate_netlink_event);
149 151
150static int acpi_event_genetlink_init(void) 152static int acpi_event_genetlink_init(void)
151{ 153{
152 int result; 154 return genl_register_family(&acpi_event_genl_family);
153
154 result = genl_register_family(&acpi_event_genl_family);
155 if (result)
156 return result;
157
158 result = genl_register_mc_group(&acpi_event_genl_family,
159 &acpi_event_mcgrp);
160 if (result)
161 genl_unregister_family(&acpi_event_genl_family);
162
163 return result;
164} 155}
165 156
166#else 157#else