diff options
Diffstat (limited to 'drivers/i2c/chips/via686a.c')
-rw-r--r-- | drivers/i2c/chips/via686a.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/i2c/chips/via686a.c b/drivers/i2c/chips/via686a.c index 9b948f4531f5..6614a59cecd4 100644 --- a/drivers/i2c/chips/via686a.c +++ b/drivers/i2c/chips/via686a.c | |||
@@ -574,7 +574,7 @@ static ssize_t show_alarms(struct device *dev, char *buf) { | |||
574 | struct via686a_data *data = via686a_update_device(dev); | 574 | struct via686a_data *data = via686a_update_device(dev); |
575 | return sprintf(buf,"%d\n", ALARMS_FROM_REG(data->alarms)); | 575 | return sprintf(buf,"%d\n", ALARMS_FROM_REG(data->alarms)); |
576 | } | 576 | } |
577 | static DEVICE_ATTR(alarms, S_IRUGO | S_IWUSR, show_alarms, NULL); | 577 | static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); |
578 | 578 | ||
579 | /* The driver. I choose to use type i2c_driver, as at is identical to both | 579 | /* The driver. I choose to use type i2c_driver, as at is identical to both |
580 | smbus_driver and isa_driver, and clients could be of either kind */ | 580 | smbus_driver and isa_driver, and clients could be of either kind */ |
@@ -651,10 +651,9 @@ static int via686a_detect(struct i2c_adapter *adapter, int address, int kind) | |||
651 | new_client->adapter = adapter; | 651 | new_client->adapter = adapter; |
652 | new_client->driver = &via686a_driver; | 652 | new_client->driver = &via686a_driver; |
653 | new_client->flags = 0; | 653 | new_client->flags = 0; |
654 | new_client->dev.parent = &adapter->dev; | ||
655 | 654 | ||
656 | /* Fill in the remaining client fields and put into the global list */ | 655 | /* Fill in the remaining client fields and put into the global list */ |
657 | snprintf(new_client->name, I2C_NAME_SIZE, client_name); | 656 | strlcpy(new_client->name, client_name, I2C_NAME_SIZE); |
658 | 657 | ||
659 | data->valid = 0; | 658 | data->valid = 0; |
660 | init_MUTEX(&data->update_lock); | 659 | init_MUTEX(&data->update_lock); |