Commit 2e4d242ce71e82d931b4deb184ff9d96c9845ac1

Authored by Dmitry Torokhov
1 parent eb76c5c03c

sony-laptop: fit input devices into sysfs tree

Properly set up parent on input devices registered by sony-laptop.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Mattia Dongili <malattia@linux.it>

Showing 1 changed file with 6 additions and 4 deletions Side-by-side Diff

drivers/misc/sony-laptop.c
... ... @@ -338,7 +338,7 @@
338 338 dprintk("unknown input event %.2x\n", event);
339 339 }
340 340  
341   -static int sony_laptop_setup_input(void)
  341 +static int sony_laptop_setup_input(struct acpi_device *acpi_device)
342 342 {
343 343 struct input_dev *jog_dev;
344 344 struct input_dev *key_dev;
... ... @@ -379,6 +379,7 @@
379 379 key_dev->name = "Sony Vaio Keys";
380 380 key_dev->id.bustype = BUS_ISA;
381 381 key_dev->id.vendor = PCI_VENDOR_ID_SONY;
  382 + key_dev->dev.parent = &acpi_device->dev;
382 383  
383 384 /* Initialize the Input Drivers: special keys */
384 385 set_bit(EV_KEY, key_dev->evbit);
... ... @@ -410,6 +411,7 @@
410 411 jog_dev->name = "Sony Vaio Jogdial";
411 412 jog_dev->id.bustype = BUS_ISA;
412 413 jog_dev->id.vendor = PCI_VENDOR_ID_SONY;
  414 + key_dev->dev.parent = &acpi_device->dev;
413 415  
414 416 jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
415 417 jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE);
... ... @@ -1006,7 +1008,7 @@
1006 1008 }
1007 1009  
1008 1010 /* setup input devices and helper fifo */
1009   - result = sony_laptop_setup_input();
  1011 + result = sony_laptop_setup_input(device);
1010 1012 if (result) {
1011 1013 printk(KERN_ERR DRV_PFX
1012 1014 "Unabe to create input devices.\n");
... ... @@ -1034,7 +1036,7 @@
1034 1036 sony_backlight_device->props.brightness =
1035 1037 sony_backlight_get_brightness
1036 1038 (sony_backlight_device);
1037   - sony_backlight_device->props.max_brightness =
  1039 + sony_backlight_device->props.max_brightness =
1038 1040 SONY_MAX_BRIGHTNESS - 1;
1039 1041 }
1040 1042  
... ... @@ -2453,7 +2455,7 @@
2453 2455 }
2454 2456  
2455 2457 /* setup input devices and helper fifo */
2456   - result = sony_laptop_setup_input();
  2458 + result = sony_laptop_setup_input(device);
2457 2459 if (result) {
2458 2460 printk(KERN_ERR DRV_PFX
2459 2461 "Unabe to create input devices.\n");