X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fmacintosh%2Fwindfarm_lm75_sensor.c;h=7e10c3ab4d50c2bf62b720dfc6cf8a126d679703;hb=4b01fef89a10cedbae9857e76283616af3f177cd;hp=ab4d1b63f63e673c70f3321a837cc4f029a380c4;hpb=445c9b5507b9d09a2e9b0b4dbb16517708aa40e6;p=linux-2.6-omap-h63xx.git diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c index ab4d1b63f63..7e10c3ab4d5 100644 --- a/drivers/macintosh/windfarm_lm75_sensor.c +++ b/drivers/macintosh/windfarm_lm75_sensor.c @@ -117,10 +117,9 @@ static struct wf_lm75_sensor *wf_lm75_create(struct i2c_adapter *adapter, DBG("wf_lm75: creating %s device at address 0x%02x\n", ds1775 ? "ds1775" : "lm75", addr); - lm = kmalloc(sizeof(struct wf_lm75_sensor), GFP_KERNEL); + lm = kzalloc(sizeof(struct wf_lm75_sensor), GFP_KERNEL); if (lm == NULL) return NULL; - memset(lm, 0, sizeof(struct wf_lm75_sensor)); /* Usual rant about sensor names not beeing very consistent in * the device-tree, oh well ... @@ -188,10 +187,10 @@ static int wf_lm75_attach(struct i2c_adapter *adapter) if (loc == NULL || addr == 0) continue; /* real lm75 */ - if (device_is_compatible(dev, "lm75")) + if (of_device_is_compatible(dev, "lm75")) wf_lm75_create(adapter, addr, 0, loc); /* ds1775 (compatible, better resolution */ - else if (device_is_compatible(dev, "ds1775")) + else if (of_device_is_compatible(dev, "ds1775")) wf_lm75_create(adapter, addr, 1, loc); } return 0;