aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sony-laptop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/sony-laptop.c')
-rw-r--r--drivers/misc/sony-laptop.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 91da6880ae93..d38ddce592c0 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -856,6 +856,15 @@ static struct dmi_system_id sony_nc_ids[] = {
856 }, 856 },
857 }, 857 },
858 { 858 {
859 .ident = "Sony Vaio FZ Series",
860 .callback = sony_nc_C_enable,
861 .driver_data = sony_C_events,
862 .matches = {
863 DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
864 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ"),
865 },
866 },
867 {
859 .ident = "Sony Vaio C Series", 868 .ident = "Sony Vaio C Series",
860 .callback = sony_nc_C_enable, 869 .callback = sony_nc_C_enable,
861 .driver_data = sony_C_events, 870 .driver_data = sony_C_events,
@@ -904,7 +913,7 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
904 913
905 dprintk("sony_acpi_notify, event: 0x%.2x\n", ev); 914 dprintk("sony_acpi_notify, event: 0x%.2x\n", ev);
906 sony_laptop_report_input_event(ev); 915 sony_laptop_report_input_event(ev);
907 acpi_bus_generate_event(sony_nc_acpi_device, 1, ev); 916 acpi_bus_generate_proc_event(sony_nc_acpi_device, 1, ev);
908} 917}
909 918
910static acpi_status sony_walk_callback(acpi_handle handle, u32 level, 919static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
@@ -2292,7 +2301,7 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id)
2292 2301
2293found: 2302found:
2294 sony_laptop_report_input_event(device_event); 2303 sony_laptop_report_input_event(device_event);
2295 acpi_bus_generate_event(spic_dev.acpi_dev, 1, device_event); 2304 acpi_bus_generate_proc_event(spic_dev.acpi_dev, 1, device_event);
2296 sonypi_compat_report_event(device_event); 2305 sonypi_compat_report_event(device_event);
2297 2306
2298 return IRQ_HANDLED; 2307 return IRQ_HANDLED;
@@ -2308,8 +2317,6 @@ static int sony_pic_remove(struct acpi_device *device, int type)
2308 struct sony_pic_ioport *io, *tmp_io; 2317 struct sony_pic_ioport *io, *tmp_io;
2309 struct sony_pic_irq *irq, *tmp_irq; 2318 struct sony_pic_irq *irq, *tmp_irq;
2310 2319
2311 sonypi_compat_exit();
2312
2313 if (sony_pic_disable(device)) { 2320 if (sony_pic_disable(device)) {
2314 printk(KERN_ERR DRV_PFX "Couldn't disable device.\n"); 2321 printk(KERN_ERR DRV_PFX "Couldn't disable device.\n");
2315 return -ENXIO; 2322 return -ENXIO;
@@ -2319,6 +2326,8 @@ static int sony_pic_remove(struct acpi_device *device, int type)
2319 release_region(spic_dev.cur_ioport->io.minimum, 2326 release_region(spic_dev.cur_ioport->io.minimum,
2320 spic_dev.cur_ioport->io.address_length); 2327 spic_dev.cur_ioport->io.address_length);
2321 2328
2329 sonypi_compat_exit();
2330
2322 sony_laptop_remove_input(); 2331 sony_laptop_remove_input();
2323 2332
2324 /* pf attrs */ 2333 /* pf attrs */
@@ -2384,6 +2393,9 @@ static int sony_pic_add(struct acpi_device *device)
2384 goto err_free_resources; 2393 goto err_free_resources;
2385 } 2394 }
2386 2395
2396 if (sonypi_compat_init())
2397 goto err_remove_input;
2398
2387 /* request io port */ 2399 /* request io port */
2388 list_for_each_entry(io, &spic_dev.ioports, list) { 2400 list_for_each_entry(io, &spic_dev.ioports, list) {
2389 if (request_region(io->io.minimum, io->io.address_length, 2401 if (request_region(io->io.minimum, io->io.address_length,
@@ -2398,7 +2410,7 @@ static int sony_pic_add(struct acpi_device *device)
2398 if (!spic_dev.cur_ioport) { 2410 if (!spic_dev.cur_ioport) {
2399 printk(KERN_ERR DRV_PFX "Failed to request_region.\n"); 2411 printk(KERN_ERR DRV_PFX "Failed to request_region.\n");
2400 result = -ENODEV; 2412 result = -ENODEV;
2401 goto err_remove_input; 2413 goto err_remove_compat;
2402 } 2414 }
2403 2415
2404 /* request IRQ */ 2416 /* request IRQ */
@@ -2438,9 +2450,6 @@ static int sony_pic_add(struct acpi_device *device)
2438 if (result) 2450 if (result)
2439 goto err_remove_pf; 2451 goto err_remove_pf;
2440 2452
2441 if (sonypi_compat_init())
2442 goto err_remove_pf;
2443
2444 return 0; 2453 return 0;
2445 2454
2446err_remove_pf: 2455err_remove_pf:
@@ -2456,6 +2465,9 @@ err_release_region:
2456 release_region(spic_dev.cur_ioport->io.minimum, 2465 release_region(spic_dev.cur_ioport->io.minimum,
2457 spic_dev.cur_ioport->io.address_length); 2466 spic_dev.cur_ioport->io.address_length);
2458 2467
2468err_remove_compat:
2469 sonypi_compat_exit();
2470
2459err_remove_input: 2471err_remove_input:
2460 sony_laptop_remove_input(); 2472 sony_laptop_remove_input();
2461 2473