X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Fsonypi.c;h=58533de59027806360ffe816e5b5571becf966b8;hb=801eb73f45371accc78ca9d6d22d647eeb722c11;hp=9782cb4d30dcaedbd0e5405dfc657c111b33c49b;hpb=26790656d7dc34206f78eeca0f4be5caede788ce;p=linux-2.6 diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 9782cb4d30..58533de590 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c @@ -7,7 +7,7 @@ * * Copyright (C) 2005 Narayanan R S * - * Copyright (C) 2001-2002 Alcôve + * Copyright (C) 2001-2002 Alcôve * * Copyright (C) 2001 Michael Ashley * @@ -506,7 +506,7 @@ static struct sonypi_device { while (--n && (command)) \ udelay(1); \ if (!n && (verbose || !quiet)) \ - printk(KERN_WARNING "sonypi command failed at %s : %s (line %d)\n", __FILE__, __FUNCTION__, __LINE__); \ + printk(KERN_WARNING "sonypi command failed at %s : %s (line %d)\n", __FILE__, __func__, __LINE__); \ } #ifdef CONFIG_ACPI @@ -1147,7 +1147,7 @@ static int sonypi_acpi_remove(struct acpi_device *device, int type) return 0; } -const static struct acpi_device_id sonypi_device_ids[] = { +static const struct acpi_device_id sonypi_device_ids[] = { {"SNY6001", 0}, {"", 0}, }; @@ -1163,7 +1163,7 @@ static struct acpi_driver sonypi_acpi_driver = { }; #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_devices(void) 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_devices(void) 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 platform_device *dev) 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"); @@ -1432,7 +1434,7 @@ static int __devexit sonypi_remove(struct platform_device *dev) { sonypi_disable(); - synchronize_sched(); /* Allow sonypi interrupt to complete. */ + synchronize_irq(sonypi_device.irq); flush_scheduled_work(); if (useinput) {