* [PATCH 2.6.28-rc3] ACPI: fix inconsistent acpi event format
@ 2008-11-05 16:42 Yi Yang
0 siblings, 0 replies; only message in thread
From: Yi Yang @ 2008-11-05 16:42 UTC (permalink / raw)
To: lenb; +Cc: linux-acpi, linux-kernel
Subject: ACPI: fix inconsistent acpi event format
From: Yi Yang <yi.y.yang@intel.com>
Event format acpi generates for /proc/acpi/event is different from
that for generic netlink interface. Here are i got:
>From /proc/acpi/event, i got the following events when i suspend and
resume Acer's Aspire One:
battery BAT1 00000080 00000000
battery BAT1 00000081 00000000
ac_adapter ACAD 00000080 00000001
battery BAT1 00000080 00000000
But from generic netlink socket, i got the following events when i suspend
and resume Acer's Aspire One:
battery PNP0C0A:00 00000080 00000000
battery PNP0C0A:00 00000081 00000000
ac_adapter ACPI0003:00 00000080 00000001
battery PNP0C0A:00 00000080 00000000
Such inconsistent event format will make acpid or hald confused, this patch
fixes this issue, it makes acpid or hald see the same thing no matter they use
/proc/acpi/event or generic netlink interface.
After applying this patch, event format i got from /proc/acpi/event and generic
netlink interface is same, all of them are:
battery BAT1 00000080 00000000
battery BAT1 00000081 00000000
ac_adapter ACAD 00000080 00000001
battery BAT1 00000080 00000000
Please consider applying, thanks.
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
---
battery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index b2133e8..e52b336 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -782,7 +782,7 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
acpi_bus_generate_proc_event(device, event,
acpi_battery_present(battery));
acpi_bus_generate_netlink_event(device->pnp.device_class,
- device->dev.bus_id, event,
+ device->pnp.bus_id, event,
acpi_battery_present(battery));
#ifdef CONFIG_ACPI_SYSFS_POWER
/* acpi_batter_update could remove power_supply object */
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-05 8:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-05 16:42 [PATCH 2.6.28-rc3] ACPI: fix inconsistent acpi event format Yi Yang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.