From: Dmitry Torokhov <dtor@insightbb.com>
To: Mattia Dongili <malattia@linux.it>
Cc: linux-acpi@vger.kernel.org
Subject: [PATCH 2/2] Sonypi: fit input devices into sysfs tree
Date: Wed, 31 Oct 2007 00:43:10 -0400 [thread overview]
Message-ID: <200710310043.10250.dtor@insightbb.com> (raw)
In-Reply-To: <200710310041.54252.dtor@insightbb.com>
Subject: Sonypi: fit input devices into sysfs tree
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Properly set up parent on input devices registered by sonypi.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/char/sonypi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: linux/drivers/char/sonypi.c
===================================================================
--- linux.orig/drivers/char/sonypi.c
+++ linux/drivers/char/sonypi.c
@@ -1163,7 +1163,7 @@ static struct acpi_driver sonypi_acpi_dr
};
#endif
-static int __devinit sonypi_create_input_devices(void)
+static int __devinit sonypi_create_input_devices(struct platform_device *pdev)
{
struct input_dev *jog_dev;
struct input_dev *key_dev;
@@ -1177,6 +1177,7 @@ static int __devinit sonypi_create_input
jog_dev->name = "Sony Vaio Jogdial";
jog_dev->id.bustype = BUS_ISA;
jog_dev->id.vendor = PCI_VENDOR_ID_SONY;
+ jog_dev->dev.parent = &pdev->dev;
jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE);
@@ -1191,6 +1192,7 @@ static int __devinit sonypi_create_input
key_dev->name = "Sony Vaio Keys";
key_dev->id.bustype = BUS_ISA;
key_dev->id.vendor = PCI_VENDOR_ID_SONY;
+ key_dev->dev.parent = &pdev->dev;
/* Initialize the Input Drivers: special keys */
key_dev->evbit[0] = BIT_MASK(EV_KEY);
@@ -1385,7 +1387,7 @@ static int __devinit sonypi_probe(struct
if (useinput) {
- error = sonypi_create_input_devices();
+ error = sonypi_create_input_devices(dev);
if (error) {
printk(KERN_ERR
"sonypi: failed to create input devices\n");
next prev parent reply other threads:[~2007-10-31 4:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-31 4:41 [PATCH 1/2] Sonypi: use synchronize_irq instead of sycnronize_sched Dmitry Torokhov
2007-10-31 4:43 ` Dmitry Torokhov [this message]
2007-11-20 23:09 ` [PATCH 2/2] Sonypi: fit input devices into sysfs tree Mattia Dongili
2007-11-20 23:08 ` [PATCH 1/2] Sonypi: use synchronize_irq instead of sycnronize_sched Mattia Dongili
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710310043.10250.dtor@insightbb.com \
--to=dtor@insightbb.com \
--cc=linux-acpi@vger.kernel.org \
--cc=malattia@linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.