Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62579
b: refs/heads/master
c: 9c977a4
h: refs/heads/master
i:
  62577: 983997a
  62575: a79c558
v: v3
  • Loading branch information
Zhang Rui authored and Len Brown committed Jul 22, 2007
1 parent 57b08bf commit ee6859b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b563d6f30d937510e02541930b1558d0f5759413
refs/heads/master: 9c977a453ed62396d067b75f3f272b3fb1ea3acc
29 changes: 9 additions & 20 deletions trunk/drivers/acpi/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,30 +132,19 @@ enum {
};
#define ACPI_GENL_CMD_MAX (__ACPI_GENL_CMD_MAX - 1)

#define ACPI_GENL_NAME "acpi_event"
#define ACPI_GENL_VERSION 0x01
#define ACPI_GENL_FAMILY_NAME "acpi_event"
#define ACPI_GENL_VERSION 0x01
#define ACPI_GENL_MCAST_GROUP_NAME "acpi_mc_group"

static struct genl_family acpi_event_genl_family = {
.id = GENL_ID_GENERATE,
.name = ACPI_GENL_NAME,
.name = ACPI_GENL_FAMILY_NAME,
.version = ACPI_GENL_VERSION,
.maxattr = ACPI_GENL_ATTR_MAX,
};

/* .doit: standard command callback */
static int acpi_genl_cmd_event(struct sk_buff *skb, struct genl_info *info)
{
struct acpi_genl_event *event = info->userhdr;

if (!event)
ACPI_DEBUG_PRINT((ACPI_DB_WARN, "ACPI event: NULL\n"));

return 0;
}

static struct genl_ops acpi_event_genl_ops = {
.cmd = ACPI_GENL_CMD_EVENT,
.doit = acpi_genl_cmd_event,
static struct genl_multicast_group acpi_event_mcgrp = {
.name = ACPI_GENL_MCAST_GROUP_NAME,
};

int acpi_bus_generate_genetlink_event(struct acpi_device *device,
Expand Down Expand Up @@ -215,7 +204,7 @@ int acpi_bus_generate_genetlink_event(struct acpi_device *device,
}

result =
genlmsg_multicast(skb, 0, acpi_event_genl_family.id, GFP_ATOMIC);
genlmsg_multicast(skb, 0, acpi_event_mcgrp.id, GFP_ATOMIC);
if (result)
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Failed to send a Genetlink message!\n"));
Expand All @@ -230,8 +219,8 @@ static int acpi_event_genetlink_init(void)
if (result)
return result;

result =
genl_register_ops(&acpi_event_genl_family, &acpi_event_genl_ops);
result = genl_register_mc_group(&acpi_event_genl_family,
&acpi_event_mcgrp);
if (result)
genl_unregister_family(&acpi_event_genl_family);

Expand Down

0 comments on commit ee6859b

Please sign in to comment.