]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/sbshc.c
ACPI: catch calls of acpi_driver_data on pointer of wrong type
[linux-2.6-omap-h63xx.git] / drivers / acpi / sbshc.c
index a4e3767b8c64241c6bd1c11010f0c2001fd7e7c1..001d9143a2cb18923b2f56695e2a6fc6681cdcb7 100644 (file)
@@ -282,7 +282,7 @@ static int acpi_smbus_hc_add(struct acpi_device *device)
        hc->ec = acpi_driver_data(device->parent);
        hc->offset = (val >> 8) & 0xff;
        hc->query_bit = val & 0xff;
-       acpi_driver_data(device) = hc;
+       device->driver_data = hc;
 
        acpi_ec_add_query_handler(hc->ec, hc->query_bit, NULL, smbus_alarm, hc);
        printk(KERN_INFO PREFIX "SBS HC: EC = 0x%p, offset = 0x%0x, query_bit = 0x%0x\n",
@@ -303,7 +303,7 @@ static int acpi_smbus_hc_remove(struct acpi_device *device, int type)
        hc = acpi_driver_data(device);
        acpi_ec_remove_query_handler(hc->ec, hc->query_bit);
        kfree(hc);
-       acpi_driver_data(device) = NULL;
+       device->driver_data = NULL;
        return 0;
 }