lm87.c (df9b42963f2d010ae3163a894ce22cf6b27cd344) lm87.c (a8b3a3a53f9a814e9938ea9cc179086ff5c0a387)
1/*
2 * lm87.c
3 *
4 * Copyright (C) 2000 Frodo Looijaard <frodol@dds.nl>
5 * Philip Edelbrock <phil@netroedge.com>
6 * Stephen Rousset <stephen.rousset@rocketlogix.com>
7 * Dan Eaton <dan.eaton@rocketlogix.com>
8 * Copyright (C) 2004-2008 Jean Delvare <khali@linux-fr.org>

--- 841 unchanged lines hidden (view full) ---

850 sysfs_remove_group(&dev->kobj, &lm87_group_in0_5);
851 sysfs_remove_group(&dev->kobj, &lm87_group_vid);
852}
853
854static void lm87_init_client(struct i2c_client *client)
855{
856 struct lm87_data *data = i2c_get_clientdata(client);
857
1/*
2 * lm87.c
3 *
4 * Copyright (C) 2000 Frodo Looijaard <frodol@dds.nl>
5 * Philip Edelbrock <phil@netroedge.com>
6 * Stephen Rousset <stephen.rousset@rocketlogix.com>
7 * Dan Eaton <dan.eaton@rocketlogix.com>
8 * Copyright (C) 2004-2008 Jean Delvare <khali@linux-fr.org>

--- 841 unchanged lines hidden (view full) ---

850 sysfs_remove_group(&dev->kobj, &lm87_group_in0_5);
851 sysfs_remove_group(&dev->kobj, &lm87_group_vid);
852}
853
854static void lm87_init_client(struct i2c_client *client)
855{
856 struct lm87_data *data = i2c_get_clientdata(client);
857
858 if (client->dev.platform_data) {
859 data->channel = *(u8 *)client->dev.platform_data;
858 if (dev_get_platdata(&client->dev)) {
859 data->channel = *(u8 *)dev_get_platdata(&client->dev);
860 lm87_write_value(client,
861 LM87_REG_CHANNEL_MODE, data->channel);
862 } else {
863 data->channel = lm87_read_value(client, LM87_REG_CHANNEL_MODE);
864 }
865 data->config = lm87_read_value(client, LM87_REG_CONFIG) & 0x6F;
866
867 if (!(data->config & 0x01)) {

--- 149 unchanged lines hidden ---
860 lm87_write_value(client,
861 LM87_REG_CHANNEL_MODE, data->channel);
862 } else {
863 data->channel = lm87_read_value(client, LM87_REG_CHANNEL_MODE);
864 }
865 data->config = lm87_read_value(client, LM87_REG_CONFIG) & 0x6F;
866
867 if (!(data->config & 0x01)) {

--- 149 unchanged lines hidden ---