summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-11-26 20:28:06 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-05 22:16:21 -0800
commit8a9947552d43b0d20d5fa23ac0ba435d526be454 (patch)
tree086844a62f549e488ebeecc196e1d4726a1d4598 /drivers/hwmon
parentff179c8cf5caa17bf3d407edbb5872aa2eee6900 (diff)
[PATCH] i2c: Drop i2c_driver.flags, 2 of 3
Just about every i2c chip driver sets the I2C_DF_NOTIFY flag, so we can simply make it the default and drop the flag. If any driver really doesn't want to be notified when i2c adapters are added, that driver can simply omit to set .attach_adapter. This approach is also more robust as it prevents accidental NULL pointer dereferences. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/adm1021.c1
-rw-r--r--drivers/hwmon/adm1025.c1
-rw-r--r--drivers/hwmon/adm1026.c1
-rw-r--r--drivers/hwmon/adm1031.c1
-rw-r--r--drivers/hwmon/adm9240.c1
-rw-r--r--drivers/hwmon/asb100.c1
-rw-r--r--drivers/hwmon/atxp1.c1
-rw-r--r--drivers/hwmon/ds1621.c1
-rw-r--r--drivers/hwmon/fscher.c1
-rw-r--r--drivers/hwmon/fscpos.c1
-rw-r--r--drivers/hwmon/gl518sm.c1
-rw-r--r--drivers/hwmon/gl520sm.c1
-rw-r--r--drivers/hwmon/it87.c1
-rw-r--r--drivers/hwmon/lm63.c1
-rw-r--r--drivers/hwmon/lm75.c1
-rw-r--r--drivers/hwmon/lm77.c1
-rw-r--r--drivers/hwmon/lm78.c1
-rw-r--r--drivers/hwmon/lm80.c1
-rw-r--r--drivers/hwmon/lm83.c1
-rw-r--r--drivers/hwmon/lm85.c1
-rw-r--r--drivers/hwmon/lm87.c1
-rw-r--r--drivers/hwmon/lm90.c1
-rw-r--r--drivers/hwmon/lm92.c1
-rw-r--r--drivers/hwmon/max1619.c1
-rw-r--r--drivers/hwmon/w83781d.c1
-rw-r--r--drivers/hwmon/w83792d.c1
-rw-r--r--drivers/hwmon/w83l785ts.c1
27 files changed, 0 insertions, 27 deletions
diff --git a/drivers/hwmon/adm1021.c b/drivers/hwmon/adm1021.c
index 8102876c7c3..5e6df4b7b85 100644
--- a/drivers/hwmon/adm1021.c
+++ b/drivers/hwmon/adm1021.c
@@ -129,7 +129,6 @@ static struct i2c_driver adm1021_driver = {
.owner = THIS_MODULE,
.name = "adm1021",
.id = I2C_DRIVERID_ADM1021,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = adm1021_attach_adapter,
.detach_client = adm1021_detach_client,
};
diff --git a/drivers/hwmon/adm1025.c b/drivers/hwmon/adm1025.c
index bf67860e6a2..2be48a7a90b 100644
--- a/drivers/hwmon/adm1025.c
+++ b/drivers/hwmon/adm1025.c
@@ -121,7 +121,6 @@ static struct i2c_driver adm1025_driver = {
.owner = THIS_MODULE,
.name = "adm1025",
.id = I2C_DRIVERID_ADM1025,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = adm1025_attach_adapter,
.detach_client = adm1025_detach_client,
};
diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c
index 5036b17a39c..5416db809f9 100644
--- a/drivers/hwmon/adm1026.c
+++ b/drivers/hwmon/adm1026.c
@@ -310,7 +310,6 @@ static void adm1026_init_client(struct i2c_client *client);
static struct i2c_driver adm1026_driver = {
.owner = THIS_MODULE,
.name = "adm1026",
- .flags = I2C_DF_NOTIFY,
.attach_adapter = adm1026_attach_adapter,
.detach_client = adm1026_detach_client,
};
diff --git a/drivers/hwmon/adm1031.c b/drivers/hwmon/adm1031.c
index 7c545d5eee4..1e24428090c 100644
--- a/drivers/hwmon/adm1031.c
+++ b/drivers/hwmon/adm1031.c
@@ -107,7 +107,6 @@ static struct adm1031_data *adm1031_update_device(struct device *dev);
static struct i2c_driver adm1031_driver = {
.owner = THIS_MODULE,
.name = "adm1031",
- .flags = I2C_DF_NOTIFY,
.attach_adapter = adm1031_attach_adapter,
.detach_client = adm1031_detach_client,
};
diff --git a/drivers/hwmon/adm9240.c b/drivers/hwmon/adm9240.c
index 11dc95f8a17..287733fe2c0 100644
--- a/drivers/hwmon/adm9240.c
+++ b/drivers/hwmon/adm9240.c
@@ -140,7 +140,6 @@ static struct i2c_driver adm9240_driver = {
.owner = THIS_MODULE,
.name = "adm9240",
.id = I2C_DRIVERID_ADM9240,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = adm9240_attach_adapter,
.detach_client = adm9240_detach_client,
};
diff --git a/drivers/hwmon/asb100.c b/drivers/hwmon/asb100.c
index 52c469722a6..7227f800bef 100644
--- a/drivers/hwmon/asb100.c
+++ b/drivers/hwmon/asb100.c
@@ -220,7 +220,6 @@ static struct i2c_driver asb100_driver = {
.owner = THIS_MODULE,
.name = "asb100",
.id = I2C_DRIVERID_ASB100,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = asb100_attach_adapter,
.detach_client = asb100_detach_client,
};
diff --git a/drivers/hwmon/atxp1.c b/drivers/hwmon/atxp1.c
index 53324f56404..a60a9f20281 100644
--- a/drivers/hwmon/atxp1.c
+++ b/drivers/hwmon/atxp1.c
@@ -52,7 +52,6 @@ static int atxp1_detect(struct i2c_adapter *adapter, int address, int kind);
static struct i2c_driver atxp1_driver = {
.owner = THIS_MODULE,
.name = "atxp1",
- .flags = I2C_DF_NOTIFY,
.attach_adapter = atxp1_attach_adapter,
.detach_client = atxp1_detach_client,
};
diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c
index 34f71b7c7f3..0096eb37c66 100644
--- a/drivers/hwmon/ds1621.c
+++ b/drivers/hwmon/ds1621.c
@@ -92,7 +92,6 @@ static struct i2c_driver ds1621_driver = {
.owner = THIS_MODULE,
.name = "ds1621",
.id = I2C_DRIVERID_DS1621,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = ds1621_attach_adapter,
.detach_client = ds1621_detach_client,
};
diff --git a/drivers/hwmon/fscher.c b/drivers/hwmon/fscher.c
index a02e1c34c75..f56ca06dbf8 100644
--- a/drivers/hwmon/fscher.c
+++ b/drivers/hwmon/fscher.c
@@ -121,7 +121,6 @@ static struct i2c_driver fscher_driver = {
.owner = THIS_MODULE,
.name = "fscher",
.id = I2C_DRIVERID_FSCHER,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = fscher_attach_adapter,
.detach_client = fscher_detach_client,
};
diff --git a/drivers/hwmon/fscpos.c b/drivers/hwmon/fscpos.c
index 64e4edc64f8..701dffc2cee 100644
--- a/drivers/hwmon/fscpos.c
+++ b/drivers/hwmon/fscpos.c
@@ -103,7 +103,6 @@ static struct i2c_driver fscpos_driver = {
.owner = THIS_MODULE,
.name = "fscpos",
.id = I2C_DRIVERID_FSCPOS,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = fscpos_attach_adapter,
.detach_client = fscpos_detach_client,
};
diff --git a/drivers/hwmon/gl518sm.c b/drivers/hwmon/gl518sm.c
index 2f178dbe3d8..5788bbb77d8 100644
--- a/drivers/hwmon/gl518sm.c
+++ b/drivers/hwmon/gl518sm.c
@@ -154,7 +154,6 @@ static struct i2c_driver gl518_driver = {
.owner = THIS_MODULE,
.name = "gl518sm",
.id = I2C_DRIVERID_GL518,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = gl518_attach_adapter,
.detach_client = gl518_detach_client,
};
diff --git a/drivers/hwmon/gl520sm.c b/drivers/hwmon/gl520sm.c
index c39ba123942..b3998165193 100644
--- a/drivers/hwmon/gl520sm.c
+++ b/drivers/hwmon/gl520sm.c
@@ -112,7 +112,6 @@ static struct i2c_driver gl520_driver = {
.owner = THIS_MODULE,
.name = "gl520sm",
.id = I2C_DRIVERID_GL520,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = gl520_attach_adapter,
.detach_client = gl520_detach_client,
};
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index a61f5d00f10..d5f0d92378c 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -237,7 +237,6 @@ static struct i2c_driver it87_driver = {
.owner = THIS_MODULE,
.name = "it87",
.id = I2C_DRIVERID_IT87,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = it87_attach_adapter,
.detach_client = it87_detach_client,
};
diff --git a/drivers/hwmon/lm63.c b/drivers/hwmon/lm63.c
index 954ec249724..c2dd4ac8042 100644
--- a/drivers/hwmon/lm63.c
+++ b/drivers/hwmon/lm63.c
@@ -141,7 +141,6 @@ static void lm63_init_client(struct i2c_client *client);
static struct i2c_driver lm63_driver = {
.owner = THIS_MODULE,
.name = "lm63",
- .flags = I2C_DF_NOTIFY,
.attach_adapter = lm63_attach_adapter,
.detach_client = lm63_detach_client,
};
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index d70f4c8fc1e..0bcbd651513 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -69,7 +69,6 @@ static struct i2c_driver lm75_driver = {
.owner = THIS_MODULE,
.name = "lm75",
.id = I2C_DRIVERID_LM75,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = lm75_attach_adapter,
.detach_client = lm75_detach_client,
};
diff --git a/drivers/hwmon/lm77.c b/drivers/hwmon/lm77.c
index 9380fda7dcd..6a524e92432 100644
--- a/drivers/hwmon/lm77.c
+++ b/drivers/hwmon/lm77.c
@@ -76,7 +76,6 @@ static struct lm77_data *lm77_update_device(struct device *dev);
static struct i2c_driver lm77_driver = {
.owner = THIS_MODULE,
.name = "lm77",
- .flags = I2C_DF_NOTIFY,
.attach_adapter = lm77_attach_adapter,
.detach_client = lm77_detach_client,
};
diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c
index 78cdd506439..18448f83a6b 100644
--- a/drivers/hwmon/lm78.c
+++ b/drivers/hwmon/lm78.c
@@ -167,7 +167,6 @@ static struct i2c_driver lm78_driver = {
.owner = THIS_MODULE,
.name = "lm78",
.id = I2C_DRIVERID_LM78,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = lm78_attach_adapter,
.detach_client = lm78_detach_client,
};
diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c
index c359fdea211..02303fa0c46 100644
--- a/drivers/hwmon/lm80.c
+++ b/drivers/hwmon/lm80.c
@@ -146,7 +146,6 @@ static struct i2c_driver lm80_driver = {
.owner = THIS_MODULE,
.name = "lm80",
.id = I2C_DRIVERID_LM80,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = lm80_attach_adapter,
.detach_client = lm80_detach_client,
};
diff --git a/drivers/hwmon/lm83.c b/drivers/hwmon/lm83.c
index 9a70611a9f6..96cb34ea249 100644
--- a/drivers/hwmon/lm83.c
+++ b/drivers/hwmon/lm83.c
@@ -127,7 +127,6 @@ static struct i2c_driver lm83_driver = {
.owner = THIS_MODULE,
.name = "lm83",
.id = I2C_DRIVERID_LM83,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = lm83_attach_adapter,
.detach_client = lm83_detach_client,
};
diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c
index 3f5544a40f3..131ecab094a 100644
--- a/drivers/hwmon/lm85.c
+++ b/drivers/hwmon/lm85.c
@@ -383,7 +383,6 @@ static struct i2c_driver lm85_driver = {
.owner = THIS_MODULE,
.name = "lm85",
.id = I2C_DRIVERID_LM85,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = lm85_attach_adapter,
.detach_client = lm85_detach_client,
};
diff --git a/drivers/hwmon/lm87.c b/drivers/hwmon/lm87.c
index eeec1817786..26fd0b33bea 100644
--- a/drivers/hwmon/lm87.c
+++ b/drivers/hwmon/lm87.c
@@ -164,7 +164,6 @@ static struct i2c_driver lm87_driver = {
.owner = THIS_MODULE,
.name = "lm87",
.id = I2C_DRIVERID_LM87,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = lm87_attach_adapter,
.detach_client = lm87_detach_client,
};
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index 83cf2e1b09f..011923b7091 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -189,7 +189,6 @@ static struct i2c_driver lm90_driver = {
.owner = THIS_MODULE,
.name = "lm90",
.id = I2C_DRIVERID_LM90,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = lm90_attach_adapter,
.detach_client = lm90_detach_client,
};
diff --git a/drivers/hwmon/lm92.c b/drivers/hwmon/lm92.c
index 7a4b3701ed1..2005a9ee61f 100644
--- a/drivers/hwmon/lm92.c
+++ b/drivers/hwmon/lm92.c
@@ -413,7 +413,6 @@ static struct i2c_driver lm92_driver = {
.owner = THIS_MODULE,
.name = "lm92",
.id = I2C_DRIVERID_LM92,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = lm92_attach_adapter,
.detach_client = lm92_detach_client,
};
diff --git a/drivers/hwmon/max1619.c b/drivers/hwmon/max1619.c
index 69e7e125683..d5aebef126d 100644
--- a/drivers/hwmon/max1619.c
+++ b/drivers/hwmon/max1619.c
@@ -92,7 +92,6 @@ static struct max1619_data *max1619_update_device(struct device *dev);
static struct i2c_driver max1619_driver = {
.owner = THIS_MODULE,
.name = "max1619",
- .flags = I2C_DF_NOTIFY,
.attach_adapter = max1619_attach_adapter,
.detach_client = max1619_detach_client,
};
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
index ffdb3a03e2b..a78929f2b3d 100644
--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -272,7 +272,6 @@ static struct i2c_driver w83781d_driver = {
.owner = THIS_MODULE,
.name = "w83781d",
.id = I2C_DRIVERID_W83781D,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = w83781d_attach_adapter,
.detach_client = w83781d_detach_client,
};
diff --git a/drivers/hwmon/w83792d.c b/drivers/hwmon/w83792d.c
index 1ba07263036..6824243d90d 100644
--- a/drivers/hwmon/w83792d.c
+++ b/drivers/hwmon/w83792d.c
@@ -319,7 +319,6 @@ static void w83792d_init_client(struct i2c_client *client);
static struct i2c_driver w83792d_driver = {
.owner = THIS_MODULE,
.name = "w83792d",
- .flags = I2C_DF_NOTIFY,
.attach_adapter = w83792d_attach_adapter,
.detach_client = w83792d_detach_client,
};
diff --git a/drivers/hwmon/w83l785ts.c b/drivers/hwmon/w83l785ts.c
index f495b637866..35172fb455d 100644
--- a/drivers/hwmon/w83l785ts.c
+++ b/drivers/hwmon/w83l785ts.c
@@ -95,7 +95,6 @@ static struct i2c_driver w83l785ts_driver = {
.owner = THIS_MODULE,
.name = "w83l785ts",
.id = I2C_DRIVERID_W83L785TS,
- .flags = I2C_DF_NOTIFY,
.attach_adapter = w83l785ts_attach_adapter,
.detach_client = w83l785ts_detach_client,
};