[PATCH] uninline irq_enter()
[safe/jmp/linux-2.6] / drivers / acpi / i2c_ec.c
index 82e3e64..76ec8b6 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/slab.h>
 #include <linux/kernel.h>
 #include <linux/stddef.h>
-#include <linux/sched.h>
 #include <linux/init.h>
 #include <linux/i2c.h>
 #include <linux/acpi.h>
@@ -309,18 +308,16 @@ static int acpi_ec_hc_add(struct acpi_device *device)
                return -EINVAL;
        }
 
-       ec_hc = kmalloc(sizeof(struct acpi_ec_hc), GFP_KERNEL);
+       ec_hc = kzalloc(sizeof(struct acpi_ec_hc), GFP_KERNEL);
        if (!ec_hc) {
                return -ENOMEM;
        }
-       memset(ec_hc, 0, sizeof(struct acpi_ec_hc));
 
-       smbus = kmalloc(sizeof(struct acpi_ec_smbus), GFP_KERNEL);
+       smbus = kzalloc(sizeof(struct acpi_ec_smbus), GFP_KERNEL);
        if (!smbus) {
                kfree(ec_hc);
                return -ENOMEM;
        }
-       memset(smbus, 0, sizeof(struct acpi_ec_smbus));
 
        ec_hc->handle = device->handle;
        strcpy(acpi_device_name(device), ACPI_EC_HC_DEVICE_NAME);
@@ -342,6 +339,7 @@ static int acpi_ec_hc_add(struct acpi_device *device)
        smbus->adapter.owner = THIS_MODULE;
        smbus->adapter.algo = &acpi_ec_smbus_algorithm;
        smbus->adapter.algo_data = smbus;
+       smbus->adapter.dev.parent = &device->dev;
 
        if (i2c_add_adapter(&smbus->adapter)) {
                ACPI_DEBUG_PRINT((ACPI_DB_WARN,