Re: [PATCH] I2C update for 2.6.5

From: Greg KH
Date: Wed Apr 14 2004 - 18:43:48 EST


ChangeSet 1.1643.36.21, 2004/04/09 12:06:02-07:00, greg@xxxxxxxxx

[PATCH] I2C: minor bugfixes for the pcf8591.c driver and formatting cleanups.


drivers/i2c/chips/pcf8591.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)


diff -Nru a/drivers/i2c/chips/pcf8591.c b/drivers/i2c/chips/pcf8591.c
--- a/drivers/i2c/chips/pcf8591.c Wed Apr 14 15:13:11 2004
+++ b/drivers/i2c/chips/pcf8591.c Wed Apr 14 15:13:11 2004
@@ -125,8 +125,7 @@
unsigned int value;
struct i2c_client *client = to_i2c_client(dev);
struct pcf8591_data *data = i2c_get_clientdata(client);
- if ((value = (simple_strtoul(buf, NULL, 10) + 5) / 10) <= 255);
- {
+ if ((value = (simple_strtoul(buf, NULL, 10) + 5) / 10) <= 255) {
data->aout = value;
i2c_smbus_write_byte_data(client, data->control, data->aout);
}
@@ -235,9 +234,9 @@
/* OK, this is not exactly good programming practice, usually. But it is
very code-efficient in this case. */

- exit_kfree:
+exit_kfree:
kfree(new_client);
- exit:
+exit:
return err;
}

@@ -277,8 +276,7 @@

down(&data->update_lock);

- if ((data->control & PCF8591_CONTROL_AICH_MASK) != channel)
- {
+ if ((data->control & PCF8591_CONTROL_AICH_MASK) != channel) {
data->control = (data->control & ~PCF8591_CONTROL_AICH_MASK)
| channel;
i2c_smbus_write_byte(client, data->control);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/