Skip to contentSkip to conversation

ACPI: Put button input devices in correct place in sysfs

PATCH In review Andrey Borzenkov 3 participants 5 messages Nov 6, 2007 – Jan 14, 2008

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

PATCH 1/1 ACPI: Put button input devices in correct place in sysfs

Properly set up parent on input device registered by the button driver.

---

 drivers/acpi/button.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/acpi/button.c +1 -0
index 301e832..5b0f065 100644
@@ -450,6 +450,7 @@ static int acpi_button_add(struct acpi_device *device)
 		break;
 	}
 
+	input->cdev.dev = &device->dev;
 	error = input_register_device(input);
 	if (error)
 		goto err_remove_handlers;
#1 lore raw

Hi Andrey,

Quoted 2 lines · Andrey Borzenkov

Properly set up parent on input device registered by the button driver.

Seems to be a popular topic today :)

Quoted 2 lines

+ input->cdev.dev = &device->dev;

Please don't use cdev, but rather input_dev->dev.parent. cdev is going away soon.
I sent a patch a couple of days ago to teh acpi list...

Signature · 1 line
Dmitry
#2 lore raw
Quoted 6 lines · Dmitry Torokhov

Hi Andrey,

Quoted 2 lines · Andrey Borzenkov

Properly set up parent on input device registered by the button driver.

Quoted 9 lines

Seems to be a popular topic today :)

Quoted 2 lines

+ input->cdev.dev = &device->dev;

Please don't use cdev, but rather input_dev->dev.parent. cdev is going away soon.
I sent a patch a couple of days ago to teh acpi list...

You mean button patch? I could find only video one.

Just in case, here is updated version.

Subject: [PATCH] Make real parent for ACPI button input devices
From: Andrey Borzenkov <[email protected]>

---

 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:
#3 lore raw
Quoted 10 lines · Andrey Borzenkov
Quoted 9 lines · Dmitry Torokhov

Hi Andrey,

Quoted 2 lines · Andrey Borzenkov

Properly set up parent on input device registered by the button driver.

Seems to be a popular topic today :)

Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 1 line

+ input->cdev.dev = &device->dev;

Please don't use cdev, but rather input_dev->dev.parent. cdev is going away soon.
I sent a patch a couple of days ago to teh acpi list...

You mean button patch? I could find only video one.

Right, I got confused between the two...

Quoted 3 lines

Just in case, here is updated version.

Please forward to Len Brown with

Thanks!

Signature · 1 line
Dmitry
#4 lore raw
In reply to Andrey Borzenkov

Len,

Andrey's patch to the ACPI button driver still hasn't been applied to the ACPI tree.

-Carlos

Quoted 24 lines · On Sunday 11 November 2007 08:42:45 Andrey Borzenkov wrote:

Subject: [PATCH] Make real parent for ACPI button input devices
From: Andrey Borzenkov <[email protected]>

---

 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:
Signature · 3 lines
E-Mail: [email protected]
Web: strangeworlds.co.uk
GPG Key ID: 0x23EE722D