properly hookup acpi buttons to driver model tree
PATCH 1/1 properly hookup acpi buttons to driver model tree
Link input devices for ACPI buttons to their "physical" ACPI device node. This way the /sys/class/input/*/device links are set up correctly, the /proc/bus/input/devices "P: Phys=..." lines exist, and related oddness need not appear.
---
I've had this floating around for most of the last year as part of another patch ... never observed any problems.
drivers/acpi/button.c +1 -0
@@ -395,6 +395,7 @@ static int acpi_button_add(struct acpi_d error = -ENOMEM ; goto err_free_button; } + input->cdev.dev = &device->dev;/* * Determine the button type (via hid), as fixed-feature buttons
Hi David,
drivers/acpi/button.c 2007-11-04 11:48:50.000000000 -0800 static int acpi_button_add(struct acpi_d · line 399
Quoted 8 lines · David Brownell
drivers/acpi/button.c 2007-11-04 11:48:50.000000000 -0800 renamed from drivers/acpi/button.c 2007-11-04 11:47:40.000000000 -0800 +1
-0@@ -395,6 +395,7 @@ static int acpi_button_add(struct acpi_d error = -ENOMEM; goto err_free_button; } + input->cdev.dev = &device->dev;
Don't use cdev, I will be gone as of 2.6.25. Use input_dev->dev.parent please. Actually I sent a bunch of patches to ACPI/video to Len/ACPI list a couple of days ago.
Signature · 1 line
Dmitry
Quoted 15 lines · Dmitry Torokhov
Hi David,
drivers/acpi/button.c 2007-11-04 11:48:50.000000000 -0800 static int acpi_button_add(struct acpi_d · line 399
Quoted 8 lines · David Brownell
drivers/acpi/button.c 2007-11-04 11:48:50.000000000 -0800 renamed from drivers/acpi/button.c 2007-11-04 11:47:40.000000000 -0800 +1
-0@@ -395,6 +395,7 @@ static int acpi_button_add(struct acpi_d error = -ENOMEM; goto err_free_button; } + input->cdev.dev = &device->dev;Don't use cdev, I will be gone as of 2.6.25. Use
input_dev->dev.parentplease. Actually I sent a bunch of patches to ACPI/video to Len/ACPI list a couple of days ago.
Right now I'm just clearing out an old patch , which has been sitting around since very early this year (ISTR, January) ... I was kind of surprised to see this bug still exists.
So, for 2.6.24-final, what's the resolution? Is someone else's patch going to resolve this issue? Or will it not be resolved? I have no idea what patch you mean, and don't subscribe to the ACPI list...
- Dave