]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
smsc47m1: dev_warn fix
authorJean Delvare <khali@linux-fr.org>
Mon, 28 Aug 2006 12:22:34 +0000 (14:22 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 28 Sep 2006 22:31:12 +0000 (15:31 -0700)
smsc47m1: dev_warn fix

We can't use dev_warn on an i2c client before it is attached.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/smsc47m1.c

index 6c81b843d8314b9ef6ee9a4df0003d7fbaa93ad4..9cd28f2709fce5ddb2f0fe3d479013d1e5690f4f 100644 (file)
@@ -429,7 +429,8 @@ static int smsc47m1_detect(struct i2c_adapter *adapter)
        pwm2 = (smsc47m1_read_value(new_client, SMSC47M1_REG_PPIN(1)) & 0x05)
               == 0x04;
        if (!(fan1 || fan2 || pwm1 || pwm2)) {
-               dev_warn(&new_client->dev, "Device is not configured, will not use\n");
+               dev_warn(&adapter->dev, "Device at 0x%x is not configured, "
+                        "will not use\n", new_client->addr);
                err = -ENODEV;
                goto error_free;
        }