aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/therm_adt746x.c
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-07-31 18:10:03 -0400
committerPaul Mackerras <paulus@samba.org>2007-08-16 21:01:51 -0400
commitcc61f957f486871536cc5531e83337fff4fe48f3 (patch)
tree266a08e5391fab28627cd1c57642d0328647e46d /drivers/macintosh/therm_adt746x.c
parent0d279d47612d1b63155a1d9637a6fc5143dad594 (diff)
[POWERPC] drivers/macintosh/therm_adt746x.c: kmalloc + memset conversion to kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh/therm_adt746x.c')
-rw-r--r--drivers/macintosh/therm_adt746x.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index f25685b9b7cf..276945d51513 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -379,13 +379,10 @@ static int attach_one_thermostat(struct i2c_adapter *adapter, int addr,
379 if (thermostat) 379 if (thermostat)
380 return 0; 380 return 0;
381 381
382 th = (struct thermostat *) 382 th = kzalloc(sizeof(struct thermostat), GFP_KERNEL);
383 kmalloc(sizeof(struct thermostat), GFP_KERNEL);
384
385 if (!th) 383 if (!th)
386 return -ENOMEM; 384 return -ENOMEM;
387 385
388 memset(th, 0, sizeof(*th));
389 th->clt.addr = addr; 386 th->clt.addr = addr;
390 th->clt.adapter = adapter; 387 th->clt.adapter = adapter;
391 th->clt.driver = &thermostat_driver; 388 th->clt.driver = &thermostat_driver;