From: gregkh@suse.de (Greg KH)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH] I2C: max6875 code cleanup
Date: Mon, 05 Sep 2005 23:48:32 +0000 [thread overview]
Message-ID: <11259567651481@kroah.com> (raw)
In-Reply-To: <200507271243.15212.bgardner@wabtec.com>
[PATCH] I2C: max6875 code cleanup
Remove an unused local variable and change the subclient name.
Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
commit 17f990c87a1e5addc49b99a53b3d2a2fac9680e9
tree 6e17f13a5ce16299e20122d71450ca3a4c3db997
parent 0283fe6c3bdbe9ca9aefa28b24883ec1dee3ccbd
author bgardner@wabtec.com <bgardner@wabtec.com> Wed, 27 Jul 2005 12:43:14 -0500
committer Greg Kroah-Hartman <gregkh@suse.de> Mon, 05 Sep 2005 09:14:06 -0700
drivers/i2c/chips/max6875.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/chips/max6875.c b/drivers/i2c/chips/max6875.c
--- a/drivers/i2c/chips/max6875.c
+++ b/drivers/i2c/chips/max6875.c
@@ -81,7 +81,6 @@ static void max6875_update_slice(struct
struct max6875_data *data = i2c_get_clientdata(client);
int i, j, addr;
u8 *buf;
- int retval = 0;
if (slice >= USER_EEPROM_SLICES)
return;
@@ -102,7 +101,6 @@ static void max6875_update_slice(struct
/* select the eeprom address */
if (i2c_smbus_write_byte_data(client, addr >> 8, addr & 0xFF)) {
dev_err(&client->dev, "address set failed\n");
- retval = -1;
goto exit_up;
}
@@ -111,14 +109,12 @@ static void max6875_update_slice(struct
if (i2c_smbus_read_i2c_block_data(client,
MAX6875_CMD_BLK_READ,
buf) != SLICE_SIZE) {
- retval = -1;
goto exit_up;
}
} else {
for (i = 0; i < SLICE_SIZE; i++) {
j = i2c_smbus_read_byte(client);
if (j < 0) {
- retval = -1;
goto exit_up;
}
buf[i] = j;
@@ -182,7 +178,7 @@ static int max6875_detect(struct i2c_ada
i2c_smbus_xfer(adapter, address, 0, 0, 0,
I2C_SMBUS_QUICK, NULL);
- if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA
+ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_BYTE_DATA
| I2C_FUNC_SMBUS_READ_BYTE))
return 0;
@@ -218,7 +214,7 @@ static int max6875_detect(struct i2c_ada
fake_client->adapter = adapter;
fake_client->driver = &max6875_driver;
fake_client->flags = 0;
- strlcpy(fake_client->name, "max6875-dummy", I2C_NAME_SIZE);
+ strlcpy(fake_client->name, "max6875 subclient", I2C_NAME_SIZE);
/* Prevent 24RF08 corruption (in case of user error) */
i2c_smbus_write_quick(real_client, 0);
prev parent reply other threads:[~2005-09-05 23:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-27 19:44 [lm-sensors] [PATCH] I2C: max6875 code cleanup bgardner
2005-07-27 20:34 ` [lm-sensors] " Jean Delvare
2005-09-05 23:48 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11259567651481@kroah.com \
--to=gregkh@suse.de \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.