]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/hwmon/via686a.c
[ACPI] merge 3549 4320 4485 4588 4980 5483 5651 acpica asus fops pnpacpi branches...
[karo-tx-linux.git] / drivers / hwmon / via686a.c
index 54861f13fee242042c30531e489fd1c7809ad1c4..cb01848729b5e2760805c106bd7182fef28120a4 100644 (file)
@@ -572,8 +572,9 @@ static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL);
 /* The driver. I choose to use type i2c_driver, as at is identical to both
    smbus_driver and isa_driver, and clients could be of either kind */
 static struct i2c_driver via686a_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "via686a",
+       .driver = {
+               .name   = "via686a",
+       },
        .attach_adapter = via686a_detect,
        .detach_client  = via686a_detach_client,
 };
@@ -615,17 +616,17 @@ static int via686a_detect(struct i2c_adapter *adapter)
        }
 
        /* Reserve the ISA region */
-       if (!request_region(address, VIA686A_EXTENT, via686a_driver.name)) {
+       if (!request_region(address, VIA686A_EXTENT,
+                           via686a_driver.driver.name)) {
                dev_err(&adapter->dev, "region 0x%x already in use!\n",
                        address);
                return -ENODEV;
        }
 
-       if (!(data = kmalloc(sizeof(struct via686a_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct via686a_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto exit_release;
        }
-       memset(data, 0, sizeof(struct via686a_data));
 
        new_client = &data->client;
        i2c_set_clientdata(new_client, data);
@@ -712,7 +713,6 @@ static int via686a_detach_client(struct i2c_client *client)
        return 0;
 }
 
-/* Called when we have found a new VIA686A. Set limits, etc. */
 static void via686a_init_client(struct i2c_client *client)
 {
        u8 reg;