summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/atxp1.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-10-17 23:02:42 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 14:02:11 -0700
commitddec748f328af6b67e4d0ce0248a8e9f36751827 (patch)
treece99658260e0a5f3d56e67d5d33ce8e498947990 /drivers/hwmon/atxp1.c
parent7ab83a9137ccd3e092fb6ad0cb105b4d1fb617ae (diff)
downloadop-kernel-dev-ddec748f328af6b67e4d0ce0248a8e9f36751827.zip
op-kernel-dev-ddec748f328af6b67e4d0ce0248a8e9f36751827.tar.gz
[PATCH] hwmon: Missing class check in two hwmon drivers
The atxp1 and ds1621 drivers should make sure they do not probe non-hwmon i2c adapters. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hwmon/atxp1.c')
-rw-r--r--drivers/hwmon/atxp1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwmon/atxp1.c b/drivers/hwmon/atxp1.c
index deb4d34..441324fc 100644
--- a/drivers/hwmon/atxp1.c
+++ b/drivers/hwmon/atxp1.c
@@ -253,6 +253,8 @@ static DEVICE_ATTR(gpio2, S_IRUGO | S_IWUSR, atxp1_showgpio2, atxp1_storegpio2);
static int atxp1_attach_adapter(struct i2c_adapter *adapter)
{
+ if (!(adapter->class & I2C_CLASS_HWMON))
+ return 0;
return i2c_probe(adapter, &addr_data, &atxp1_detect);
};
OpenPOWER on IntegriCloud