aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-mpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-mpc.c')
-rw-r--r--drivers/i2c/busses/i2c-mpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index f065583ddcf1..8491633005b8 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -296,10 +296,9 @@ static int fsl_i2c_probe(struct device *device)
296 296
297 pdata = (struct fsl_i2c_platform_data *) pdev->dev.platform_data; 297 pdata = (struct fsl_i2c_platform_data *) pdev->dev.platform_data;
298 298
299 if (!(i2c = kmalloc(sizeof(*i2c), GFP_KERNEL))) { 299 if (!(i2c = kzalloc(sizeof(*i2c), GFP_KERNEL))) {
300 return -ENOMEM; 300 return -ENOMEM;
301 } 301 }
302 memset(i2c, 0, sizeof(*i2c));
303 302
304 i2c->irq = platform_get_irq(pdev, 0); 303 i2c->irq = platform_get_irq(pdev, 0);
305 i2c->flags = pdata->device_flags; 304 i2c->flags = pdata->device_flags;
@@ -361,6 +360,7 @@ static int fsl_i2c_remove(struct device *device)
361 360
362/* Structure for a device driver */ 361/* Structure for a device driver */
363static struct device_driver fsl_i2c_driver = { 362static struct device_driver fsl_i2c_driver = {
363 .owner = THIS_MODULE,
364 .name = "fsl-i2c", 364 .name = "fsl-i2c",
365 .bus = &platform_bus_type, 365 .bus = &platform_bus_type,
366 .probe = fsl_i2c_probe, 366 .probe = fsl_i2c_probe,