diff options
Diffstat (limited to 'drivers/hwmon/smsc47b397.c')
-rw-r--r-- | drivers/hwmon/smsc47b397.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/smsc47b397.c b/drivers/hwmon/smsc47b397.c index 7fe71576dea4..2a3e21b5b6b4 100644 --- a/drivers/hwmon/smsc47b397.c +++ b/drivers/hwmon/smsc47b397.c | |||
@@ -244,11 +244,10 @@ static int smsc47b397_detect(struct i2c_adapter *adapter) | |||
244 | return -EBUSY; | 244 | return -EBUSY; |
245 | } | 245 | } |
246 | 246 | ||
247 | if (!(data = kmalloc(sizeof(struct smsc47b397_data), GFP_KERNEL))) { | 247 | if (!(data = kzalloc(sizeof(struct smsc47b397_data), GFP_KERNEL))) { |
248 | err = -ENOMEM; | 248 | err = -ENOMEM; |
249 | goto error_release; | 249 | goto error_release; |
250 | } | 250 | } |
251 | memset(data, 0x00, sizeof(struct smsc47b397_data)); | ||
252 | 251 | ||
253 | new_client = &data->client; | 252 | new_client = &data->client; |
254 | i2c_set_clientdata(new_client, data); | 253 | i2c_set_clientdata(new_client, data); |
@@ -299,7 +298,7 @@ static int __init smsc47b397_find(unsigned short *addr) | |||
299 | superio_enter(); | 298 | superio_enter(); |
300 | id = superio_inb(SUPERIO_REG_DEVID); | 299 | id = superio_inb(SUPERIO_REG_DEVID); |
301 | 300 | ||
302 | if (id != 0x6f) { | 301 | if ((id != 0x6f) && (id != 0x81)) { |
303 | superio_exit(); | 302 | superio_exit(); |
304 | return -ENODEV; | 303 | return -ENODEV; |
305 | } | 304 | } |
@@ -310,8 +309,9 @@ static int __init smsc47b397_find(unsigned short *addr) | |||
310 | *addr = (superio_inb(SUPERIO_REG_BASE_MSB) << 8) | 309 | *addr = (superio_inb(SUPERIO_REG_BASE_MSB) << 8) |
311 | | superio_inb(SUPERIO_REG_BASE_LSB); | 310 | | superio_inb(SUPERIO_REG_BASE_LSB); |
312 | 311 | ||
313 | printk(KERN_INFO "smsc47b397: found SMSC LPC47B397-NC " | 312 | printk(KERN_INFO "smsc47b397: found SMSC %s " |
314 | "(base address 0x%04x, revision %u)\n", *addr, rev); | 313 | "(base address 0x%04x, revision %u)\n", |
314 | id == 0x81 ? "SCH5307-NS" : "LPC47B397-NC", *addr, rev); | ||
315 | 315 | ||
316 | superio_exit(); | 316 | superio_exit(); |
317 | return 0; | 317 | return 0; |