diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 16:12:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 16:12:46 -0400 |
commit | c4ec20717313daafba59225f812db89595952b83 (patch) | |
tree | 253337453b1dc965c40668e4949337ed1c46cab7 /drivers/acpi/bus.c | |
parent | ec2626815bf9a9922e49820b03e670e833f3ca3c (diff) | |
parent | 00a2b433557f10736e8a02de619b3e9052556c12 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (41 commits)
ACPICA: hw: Don't carry spinlock over suspend
ACPICA: hw: remove use_lock flag from acpi_hw_register_{read, write}
ACPI: cpuidle: port idle timer suspend/resume workaround to cpuidle
ACPI: clean up acpi_enter_sleep_state_prep
Hibernation: Make sure that ACPI is enabled in acpi_hibernation_finish
ACPI: suppress uninitialized var warning
cpuidle: consolidate 2.6.22 cpuidle branch into one patch
ACPI: thinkpad-acpi: skip blanks before the data when parsing sysfs
ACPI: AC: Add sysfs interface
ACPI: SBS: Add sysfs alarm
ACPI: SBS: Add ACPI_PROCFS around procfs handling code.
ACPI: SBS: Add support for power_supply class (and sysfs)
ACPI: SBS: Make SBS reads table-driven.
ACPI: SBS: Simplify data structures in SBS
ACPI: SBS: Split host controller (ACPI0001) from SBS driver (ACPI0002)
ACPI: EC: Add new query handler to list head.
ACPI: Add acpi_bus_generate_event4() function
ACPI: Battery: add sysfs alarm
ACPI: Battery: Add sysfs support
ACPI: Battery: Misc clean-ups, no functional changes
...
Fix up conflicts in drivers/misc/thinkpad_acpi.[ch] manually
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r-- | drivers/acpi/bus.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index cbfc81579c9..fb2cff9a2d2 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -286,15 +286,11 @@ DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue); | |||
286 | 286 | ||
287 | extern int event_is_open; | 287 | extern int event_is_open; |
288 | 288 | ||
289 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) | 289 | int acpi_bus_generate_proc_event4(const char *device_class, const char *bus_id, u8 type, int data) |
290 | { | 290 | { |
291 | struct acpi_bus_event *event = NULL; | 291 | struct acpi_bus_event *event; |
292 | unsigned long flags = 0; | 292 | unsigned long flags = 0; |
293 | 293 | ||
294 | |||
295 | if (!device) | ||
296 | return -EINVAL; | ||
297 | |||
298 | /* drop event on the floor if no one's listening */ | 294 | /* drop event on the floor if no one's listening */ |
299 | if (!event_is_open) | 295 | if (!event_is_open) |
300 | return 0; | 296 | return 0; |
@@ -303,8 +299,8 @@ int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) | |||
303 | if (!event) | 299 | if (!event) |
304 | return -ENOMEM; | 300 | return -ENOMEM; |
305 | 301 | ||
306 | strcpy(event->device_class, device->pnp.device_class); | 302 | strcpy(event->device_class, device_class); |
307 | strcpy(event->bus_id, device->pnp.bus_id); | 303 | strcpy(event->bus_id, bus_id); |
308 | event->type = type; | 304 | event->type = type; |
309 | event->data = data; | 305 | event->data = data; |
310 | 306 | ||
@@ -315,6 +311,17 @@ int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) | |||
315 | wake_up_interruptible(&acpi_bus_event_queue); | 311 | wake_up_interruptible(&acpi_bus_event_queue); |
316 | 312 | ||
317 | return 0; | 313 | return 0; |
314 | |||
315 | } | ||
316 | |||
317 | EXPORT_SYMBOL_GPL(acpi_bus_generate_proc_event4); | ||
318 | |||
319 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) | ||
320 | { | ||
321 | if (!device) | ||
322 | return -EINVAL; | ||
323 | return acpi_bus_generate_proc_event4(device->pnp.device_class, | ||
324 | device->pnp.bus_id, type, data); | ||
318 | } | 325 | } |
319 | 326 | ||
320 | EXPORT_SYMBOL(acpi_bus_generate_proc_event); | 327 | EXPORT_SYMBOL(acpi_bus_generate_proc_event); |