Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02ff982c authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman
Browse files

[PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (8/9)



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.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5071860a
Loading
Loading
Loading
Loading
+5 −6
Original line number Original line Diff line number Diff line
@@ -315,11 +315,10 @@ For now, you can ignore the `flags' parameter. It is there for future use.
    const char *type_name = "";
    const char *type_name = "";
    int is_isa = i2c_is_isa_adapter(adapter);
    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
    if (is_isa) {
         (call `goto ERROR0'). But for kicks, we will assume it is all
         right. */


      /* Discard immediately if this ISA range is already used */
      /* Discard immediately if this ISA range is already used */
      if (check_region(address,FOO_EXTENT))
      if (check_region(address,FOO_EXTENT))
@@ -495,10 +494,10 @@ much simpler than the attachment code, fortunately!
      return err;
      return err;
    }
    }


    /* SENSORS ONLY START */
    /* HYBRID SENSORS CHIP ONLY START */
    if i2c_is_isa_client(client)
    if i2c_is_isa_client(client)
      release_region(client->addr,LM78_EXTENT);
      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 */
    kfree(client); /* Frees client data too, if allocated at the same time */
    return 0;
    return 0;
+0 −9
Original line number Original line Diff line number Diff line
@@ -198,15 +198,6 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address, int kind)
	int err = 0;
	int err = 0;
	const char *type_name = "";
	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))
	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
		goto error0;
		goto error0;


+0 −8
Original line number Original line Diff line number Diff line
@@ -714,14 +714,6 @@ static int asb100_detect(struct i2c_adapter *adapter, int address, int kind)
	struct i2c_client *new_client;
	struct i2c_client *new_client;
	struct asb100_data *data;
	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)) {
	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
		pr_debug("asb100.o: detect failed, "
		pr_debug("asb100.o: detect failed, "
				"smbus byte data not supported!\n");
				"smbus byte data not supported!\n");
+0 −10
Original line number Original line Diff line number Diff line
@@ -121,16 +121,6 @@ static int lm75_detect(struct i2c_adapter *adapter, int address, int kind)
	int err = 0;
	int err = 0;
	const char *name = "";
	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 |
	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA |
				     I2C_FUNC_SMBUS_WORD_DATA))
				     I2C_FUNC_SMBUS_WORD_DATA))
		goto exit;
		goto exit;
+0 −5
Original line number Original line Diff line number Diff line
@@ -1033,11 +1033,6 @@ int lm85_detect(struct i2c_adapter *adapter, int address,
	int err = 0;
	int err = 0;
	const char *type_name = "";
	const char *type_name = "";


	if (i2c_is_isa_adapter(adapter)) {
		/* This chip has no ISA interface */
		goto ERROR0 ;
	};

	if (!i2c_check_functionality(adapter,
	if (!i2c_check_functionality(adapter,
					I2C_FUNC_SMBUS_BYTE_DATA)) {
					I2C_FUNC_SMBUS_BYTE_DATA)) {
		/* We need to be able to do byte I/O */
		/* We need to be able to do byte I/O */