public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: LKML <linux-kernel@vger.kernel.org>,
	LM Sensors <lm-sensors@lm-sensors.org>
Cc: Greg KH <greg@kroah.com>
Subject: [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (8/9)
Date: Wed, 20 Jul 2005 00:05:33 +0200	[thread overview]
Message-ID: <20050720000533.57ad4953.khali@linux-fr.org> (raw)
In-Reply-To: <20050719233902.40282559.khali@linux-fr.org>

Kill all uses of i2c_is_isa_adapter except for the hybrid drivers (it87,
lm78, w83781d). The i2c-isa adapter not being registered with the i2c
core anymore, drivers don't have to fear being erroneously attached to
it.

 Documentation/i2c/writing-clients |   11 +++++------
 drivers/hwmon/adm1021.c           |    9 ---------
 drivers/hwmon/asb100.c            |    8 --------
 drivers/hwmon/lm75.c              |   10 ----------
 drivers/hwmon/lm85.c              |    5 -----
 5 files changed, 5 insertions(+), 38 deletions(-)

--- linux-2.6.13-rc3.orig/Documentation/i2c/writing-clients	2005-07-17 15:20:30.000000000 +0200
+++ linux-2.6.13-rc3/Documentation/i2c/writing-clients	2005-07-17 15:45:47.000000000 +0200
@@ -315,11 +315,10 @@
     const char *type_name = "";
     int is_isa = i2c_is_isa_adapter(adapter);
 
-    if (is_isa) {
+    /* Do this only if the chip can additionally be found on the ISA bus
+       (hybrid chip). */
 
-      /* If this client can't be on the ISA bus at all, we can stop now
-         (call `goto ERROR0'). But for kicks, we will assume it is all
-         right. */
+    if (is_isa) {
 
       /* Discard immediately if this ISA range is already used */
       if (check_region(address,FOO_EXTENT))
@@ -495,10 +494,10 @@
       return err;
     }
 
-    /* SENSORS ONLY START */
+    /* HYBRID SENSORS CHIP ONLY START */
     if i2c_is_isa_client(client)
       release_region(client->addr,LM78_EXTENT);
-    /* SENSORS ONLY END */
+    /* HYBRID SENSORS CHIP ONLY END */
 
     kfree(client); /* Frees client data too, if allocated at the same time */
     return 0;
--- linux-2.6.13-rc3.orig/drivers/hwmon/adm1021.c	2005-07-17 15:13:16.000000000 +0200
+++ linux-2.6.13-rc3/drivers/hwmon/adm1021.c	2005-07-17 16:06:34.000000000 +0200
@@ -198,15 +198,6 @@
 	int err = 0;
 	const char *type_name = "";
 
-	/* Make sure we aren't probing the ISA bus!! This is just a safety check
-	   at this moment; i2c_detect really won't call us. */
-#ifdef DEBUG
-	if (i2c_is_isa_adapter(adapter)) {
-		dev_dbg(&adapter->dev, "adm1021_detect called for an ISA bus adapter?!?\n");
-		return 0;
-	}
-#endif
-
 	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
 		goto error0;
 
--- linux-2.6.13-rc3.orig/drivers/hwmon/asb100.c	2005-07-17 15:12:52.000000000 +0200
+++ linux-2.6.13-rc3/drivers/hwmon/asb100.c	2005-07-17 16:06:23.000000000 +0200
@@ -714,14 +714,6 @@
 	struct i2c_client *new_client;
 	struct asb100_data *data;
 
-	/* asb100 is SMBus only */
-	if (i2c_is_isa_adapter(adapter)) {
-		pr_debug("asb100.o: detect failed, "
-				"cannot attach to legacy adapter!\n");
-		err = -ENODEV;
-		goto ERROR0;
-	}
-
 	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
 		pr_debug("asb100.o: detect failed, "
 				"smbus byte data not supported!\n");
--- linux-2.6.13-rc3.orig/drivers/hwmon/lm75.c	2005-07-17 15:11:52.000000000 +0200
+++ linux-2.6.13-rc3/drivers/hwmon/lm75.c	2005-07-17 16:05:51.000000000 +0200
@@ -121,16 +121,6 @@
 	int err = 0;
 	const char *name = "";
 
-	/* Make sure we aren't probing the ISA bus!! This is just a safety check
-	   at this moment; i2c_detect really won't call us. */
-#ifdef DEBUG
-	if (i2c_is_isa_adapter(adapter)) {
-		dev_dbg(&adapter->dev,
-			"lm75_detect called for an ISA bus adapter?!?\n");
-		goto exit;
-	}
-#endif
-
 	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA |
 				     I2C_FUNC_SMBUS_WORD_DATA))
 		goto exit;
--- linux-2.6.13-rc3.orig/drivers/hwmon/lm85.c	2005-07-17 15:11:12.000000000 +0200
+++ linux-2.6.13-rc3/drivers/hwmon/lm85.c	2005-07-17 16:05:43.000000000 +0200
@@ -1033,11 +1033,6 @@
 	int err = 0;
 	const char *type_name = "";
 
-	if (i2c_is_isa_adapter(adapter)) {
-		/* This chip has no ISA interface */
-		goto ERROR0 ;
-	};
-
 	if (!i2c_check_functionality(adapter,
 					I2C_FUNC_SMBUS_BYTE_DATA)) {
 		/* We need to be able to do byte I/O */


-- 
Jean Delvare

  parent reply	other threads:[~2005-07-19 22:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-19 21:39 [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (0/9) Jean Delvare
2005-07-19 21:45 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (1/9) Jean Delvare
2005-07-20  4:26   ` Greg KH
2005-07-20 21:03     ` Jean Delvare
2005-07-19 21:48 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (2/9) Jean Delvare
2005-07-20  4:27   ` Greg KH
2005-07-20 21:46     ` Jean Delvare
2005-07-25  0:35       ` Greg KH
2005-07-25 17:28         ` Jean Delvare
2005-07-26 22:54           ` Greg KH
2005-07-27 20:21             ` Jean Delvare
2005-07-19 21:51 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (3/9) Jean Delvare
2005-07-19 21:53 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (4/9) Jean Delvare
2005-07-19 21:56 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (5/9) Jean Delvare
2005-07-26 22:33   ` patch i2c-hwmon-split-05.patch added to gregkh-2.6 tree gregkh
2005-07-19 21:57 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (6/9) Jean Delvare
2005-07-19 22:02 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (7/9) Jean Delvare
2005-07-19 22:05 ` Jean Delvare [this message]
2005-07-26 22:33   ` patch i2c-hwmon-split-08.patch added to gregkh-2.6 tree gregkh
2005-07-19 22:09 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (9/9) Jean Delvare
2005-07-26 22:33   ` patch i2c-hwmon-split-09.patch added to gregkh-2.6 tree gregkh

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=20050720000533.57ad4953.khali@linux-fr.org \
    --to=khali@linux-fr.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox