diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-keywest.c')
-rw-r--r-- | drivers/i2c/busses/i2c-keywest.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-keywest.c b/drivers/i2c/busses/i2c-keywest.c index eff5896ce865..d61f748278fc 100644 --- a/drivers/i2c/busses/i2c-keywest.c +++ b/drivers/i2c/busses/i2c-keywest.c | |||
@@ -535,13 +535,12 @@ create_iface(struct device_node *np, struct device *dev) | |||
535 | 535 | ||
536 | tsize = sizeof(struct keywest_iface) + | 536 | tsize = sizeof(struct keywest_iface) + |
537 | (sizeof(struct keywest_chan) + 4) * nchan; | 537 | (sizeof(struct keywest_chan) + 4) * nchan; |
538 | iface = (struct keywest_iface *) kmalloc(tsize, GFP_KERNEL); | 538 | iface = kzalloc(tsize, GFP_KERNEL); |
539 | if (iface == NULL) { | 539 | if (iface == NULL) { |
540 | printk(KERN_ERR "i2c-keywest: can't allocate inteface !\n"); | 540 | printk(KERN_ERR "i2c-keywest: can't allocate inteface !\n"); |
541 | pmac_low_i2c_unlock(np); | 541 | pmac_low_i2c_unlock(np); |
542 | return -ENOMEM; | 542 | return -ENOMEM; |
543 | } | 543 | } |
544 | memset(iface, 0, tsize); | ||
545 | spin_lock_init(&iface->lock); | 544 | spin_lock_init(&iface->lock); |
546 | init_completion(&iface->complete); | 545 | init_completion(&iface->complete); |
547 | iface->node = of_node_get(np); | 546 | iface->node = of_node_get(np); |
@@ -716,6 +715,7 @@ static struct of_device_id i2c_keywest_match[] = | |||
716 | 715 | ||
717 | static struct macio_driver i2c_keywest_macio_driver = | 716 | static struct macio_driver i2c_keywest_macio_driver = |
718 | { | 717 | { |
718 | .owner = THIS_MODULE, | ||
719 | .name = "i2c-keywest", | 719 | .name = "i2c-keywest", |
720 | .match_table = i2c_keywest_match, | 720 | .match_table = i2c_keywest_match, |
721 | .probe = create_iface_macio, | 721 | .probe = create_iface_macio, |
@@ -724,6 +724,7 @@ static struct macio_driver i2c_keywest_macio_driver = | |||
724 | 724 | ||
725 | static struct of_platform_driver i2c_keywest_of_platform_driver = | 725 | static struct of_platform_driver i2c_keywest_of_platform_driver = |
726 | { | 726 | { |
727 | .owner = THIS_MODULE, | ||
727 | .name = "i2c-keywest", | 728 | .name = "i2c-keywest", |
728 | .match_table = i2c_keywest_match, | 729 | .match_table = i2c_keywest_match, |
729 | .probe = create_iface_of_platform, | 730 | .probe = create_iface_of_platform, |