From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: Re: [PATCH] I2C patches for 2.6.10
Date: Fri, 7 Jan 2005 21:39:36 -0800 [thread overview]
Message-ID: <11051627762989@kroah.com> (raw)
In-Reply-To: <1105162776515@kroah.com>
ChangeSet 1.1938.445.10, 2004/12/21 11:09:21-08:00, khali@linux-fr.org
[PATCH] I2C: Remove checksum code in eeprom driver
As a follow-up to my earlier proposal to remove the checksum code from
the i2c eeprom driver, here is a patch that does just that. This shrinks
the driver size by around 5%, and paves the way for further fixes and
cleanups.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/i2c/chips/eeprom.c | 19 -------------------
1 files changed, 19 deletions(-)
diff -Nru a/drivers/i2c/chips/eeprom.c b/drivers/i2c/chips/eeprom.c
--- a/drivers/i2c/chips/eeprom.c 2005-01-07 14:55:12 -08:00
+++ b/drivers/i2c/chips/eeprom.c 2005-01-07 14:55:12 -08:00
@@ -43,13 +43,6 @@
/* Insmod parameters */
SENSORS_INSMOD_1(eeprom);
-static int checksum = 0;
-module_param(checksum, bool, 0);
-MODULE_PARM_DESC(checksum, "Only accept eeproms whose checksum is correct");
-
-
-/* EEPROM registers */
-#define EEPROM_REG_CHECKSUM 0x3f
/* Size of EEPROM in bytes */
#define EEPROM_SIZE 256
@@ -168,7 +161,6 @@
/* This function is called by i2c_detect */
int eeprom_detect(struct i2c_adapter *adapter, int address, int kind)
{
- int i, cs;
struct i2c_client *new_client;
struct eeprom_data *data;
int err = 0;
@@ -204,17 +196,6 @@
/* prevent 24RF08 corruption */
i2c_smbus_write_quick(new_client, 0);
-
- /* Now, we do the remaining detection. It is not there, unless you force
- the checksum to work out. */
- if (checksum) {
- cs = 0;
- for (i = 0; i <= 0x3e; i++)
- cs += i2c_smbus_read_byte_data(new_client, i);
- cs &= 0xff;
- if (i2c_smbus_read_byte_data (new_client, EEPROM_REG_CHECKSUM) != cs)
- goto exit_kfree;
- }
data->nature = UNKNOWN;
/* Detect the Vaio nature of EEPROMs.
next prev parent reply other threads:[~2005-01-08 6:40 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-08 5:38 [BK PATCH] I2C patches for 2.6.10 Greg KH
2005-05-19 6:25 ` Greg KH
2005-01-08 5:39 ` [PATCH] " Greg KH
2005-01-08 5:39 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-05-19 6:25 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-05-19 6:25 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-05-19 6:25 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-05-19 6:25 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-05-19 6:25 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-05-19 6:25 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-05-19 6:25 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-05-19 6:25 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-05-19 6:25 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-05-19 6:25 ` Greg KH
2005-01-08 5:39 ` Greg KH
2005-05-19 6:25 ` Greg KH
2005-01-08 5:39 ` Greg KH [this message]
2005-01-08 5:39 ` Greg KH
2005-05-19 6:25 ` Greg KH
2005-01-08 6:22 ` Mark M. Hoffman
2005-01-08 10:15 ` Jean Delvare
2005-01-08 15:37 ` Greg KH
2005-01-08 19:09 ` [BK PATCH] " Christoph Hellwig
2005-01-08 22:28 ` Greg KH
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=11051627762989@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sensors@stimpy.netroedge.com \
/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.