aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-mv64xxx.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-30 21:37:12 -0500
committerPaul Mackerras <paulus@samba.org>2005-10-30 21:37:12 -0500
commit23fd07750a789a66fe88cf173d52a18f1a387da4 (patch)
tree06fdd6df35fdb835abdaa9b754d62f6b84b97250 /drivers/i2c/busses/i2c-mv64xxx.c
parentbd787d438a59266af3c9f6351644c85ef1dd21fe (diff)
parented28f96ac1960f30f818374d65be71d2fdf811b0 (diff)
Merge ../linux-2.6 by hand
Diffstat (limited to 'drivers/i2c/busses/i2c-mv64xxx.c')
-rw-r--r--drivers/i2c/busses/i2c-mv64xxx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 99abca45fece..d0d2a6f1386e 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -500,13 +500,10 @@ mv64xxx_i2c_probe(struct device *dev)
500 if ((pd->id != 0) || !pdata) 500 if ((pd->id != 0) || !pdata)
501 return -ENODEV; 501 return -ENODEV;
502 502
503 drv_data = kmalloc(sizeof(struct mv64xxx_i2c_data), GFP_KERNEL); 503 drv_data = kzalloc(sizeof(struct mv64xxx_i2c_data), GFP_KERNEL);
504
505 if (!drv_data) 504 if (!drv_data)
506 return -ENOMEM; 505 return -ENOMEM;
507 506
508 memset(drv_data, 0, sizeof(struct mv64xxx_i2c_data));
509
510 if (mv64xxx_i2c_map_regs(pd, drv_data)) { 507 if (mv64xxx_i2c_map_regs(pd, drv_data)) {
511 rc = -ENODEV; 508 rc = -ENODEV;
512 goto exit_kfree; 509 goto exit_kfree;
@@ -570,6 +567,7 @@ mv64xxx_i2c_remove(struct device *dev)
570} 567}
571 568
572static struct device_driver mv64xxx_i2c_driver = { 569static struct device_driver mv64xxx_i2c_driver = {
570 .owner = THIS_MODULE,
573 .name = MV64XXX_I2C_CTLR_NAME, 571 .name = MV64XXX_I2C_CTLR_NAME,
574 .bus = &platform_bus_type, 572 .bus = &platform_bus_type,
575 .probe = mv64xxx_i2c_probe, 573 .probe = mv64xxx_i2c_probe,