]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/i2c/busses/i2c-keywest.c
Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel
[linux-2.6-omap-h63xx.git] / drivers / i2c / busses / i2c-keywest.c
index 37b49c2daf5f824a5057ff713effce45149f7116..d61f748278fc47de6e2e9a889b443cc308cbcd35 100644 (file)
@@ -535,13 +535,12 @@ create_iface(struct device_node *np, struct device *dev)
 
        tsize = sizeof(struct keywest_iface) +
                (sizeof(struct keywest_chan) + 4) * nchan;
-       iface = (struct keywest_iface *) kmalloc(tsize, GFP_KERNEL);
+       iface = kzalloc(tsize, GFP_KERNEL);
        if (iface == NULL) {
                printk(KERN_ERR "i2c-keywest: can't allocate inteface !\n");
                pmac_low_i2c_unlock(np);
                return -ENOMEM;
        }
-       memset(iface, 0, tsize);
        spin_lock_init(&iface->lock);
        init_completion(&iface->complete);
        iface->node = of_node_get(np);
@@ -611,7 +610,6 @@ create_iface(struct device_node *np, struct device *dev)
        
        for (i=0; i<nchan; i++) {
                struct keywest_chan* chan = &iface->channels[i];
-               u8 addr;
                
                sprintf(chan->adapter.name, "%s %d", np->parent->name, i);
                chan->iface = iface;
@@ -717,6 +715,7 @@ static struct of_device_id i2c_keywest_match[] =
 
 static struct macio_driver i2c_keywest_macio_driver = 
 {
+       .owner          = THIS_MODULE,
        .name           = "i2c-keywest",
        .match_table    = i2c_keywest_match,
        .probe          = create_iface_macio,
@@ -725,6 +724,7 @@ static struct macio_driver i2c_keywest_macio_driver =
 
 static struct of_platform_driver i2c_keywest_of_platform_driver = 
 {
+       .owner          = THIS_MODULE,
        .name           = "i2c-keywest",
        .match_table    = i2c_keywest_match,
        .probe          = create_iface_of_platform,