Skip to contentSkip to conversation

Make real parent for ACPI button input devices

PATCH In review Andrey Borzenkov 2 participants 3 messages Feb 28, 2008 – Feb 29, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make real parent for ACPI button input devices

From: Andrey Borzenkov <[email protected]>

Make sure input device for ACPI button gets proper place in device tree.

---

 drivers/acpi/button.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/acpi/button.c +1 -0
index 24a7865..6c5da83 100644
@@ -449,6 +449,7 @@ static int acpi_button_add(struct acpi_device *device)
 	input->phys = button->phys;
 	input->id.bustype = BUS_HOST;
 	input->id.product = button->type;
+	input->dev.parent = &device->dev;
 
 	switch (button->type) {
 	case ACPI_BUTTON_TYPE_POWER:
#1 lore raw
Quoted 19 lines · On Thu, 28 Feb 2008 21:14:26 +0300 Andrey Borzenkov <[email protected]> wrote:

From: Andrey Borzenkov <[email protected]>

Make sure input device for ACPI button gets proper place in device tree.

---

 drivers/acpi/button.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/acpi/button.c +0 -0
index 24a7865..6c5da83 100644

drivers/acpi/button.c static int acpi_button_add(struct acpi_device *device) · line 455

Quoted 7 lines
drivers/acpi/button.c +1 -0
@@ -449,6 +449,7 @@ static int acpi_button_add(struct acpi_device *device)
 	input->phys = button->phys;
 	input->id.bustype = BUS_HOST;
 	input->id.product = button->type;
+	input->dev.parent = &device->dev;
 
 	switch (button->type) {
 	case ACPI_BUTTON_TYPE_POWER:

What are the consequences of the bug which you've fixed?

It helps very much if the changelog explains things like this so we can decide whether the patch is needed in 2.6.25 or even 2.6.24.x.

Thanks.

#2 lore raw
Quoted 25 lines · Andrew Morton
Quoted 23 lines · On Thu, 28 Feb 2008 21:14:26 +0300 Andrey Borzenkov <[email protected]> wrote:

From: Andrey Borzenkov <[email protected]>

Make sure input device for ACPI button gets proper place in device tree.

---

 drivers/acpi/button.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/acpi/button.c +1 -0
index 24a7865..6c5da83 100644
@@ -449,6 +449,7 @@ static int acpi_button_add(struct acpi_device *device)
 	input->phys = button->phys;
 	input->id.bustype = BUS_HOST;
 	input->id.product = button->type;
+	input->dev.parent = &device->dev;
 
Quoted 6 lines

drivers/acpi/button.c static int acpi_button_add(struct acpi_device *device) · line 455

Quoted 3 lines
drivers/acpi/button.c +0 -0
 	switch (button->type) {
 	case ACPI_BUTTON_TYPE_POWER:

What are the consequences of the bug which you've fixed?

There is no direct negative impact; this is mostly cleanup that unifies sysfs representation of ACPI input devices. The patch was submitted for 2.6.24-rc at the same time as similar patches for other ACPI input devices but was lost for whatever reason.

Quoted 3 lines

It helps very much if the changelog explains things like this so we can decide whether the patch is needed in 2.6.25 or even 2.6.24.x.

I guess it can safely wait for post-2.6.25.