diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-05 12:56:57 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-05 12:56:57 -0400 |
commit | 616ad8c44281c0c6711a72b560e01ec335ff27e0 (patch) | |
tree | 0a20453ffedb09db6fb41a0c2208ccc2c7751d3a /drivers/i2c | |
parent | 99809963c99e1ed868d9ebeb4a5e7ee1cbe0309f (diff) | |
parent | b380b0d4f7dffcc235c0facefa537d4655619101 (diff) |
Merge branch 'linus' into x86/defconfig
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-at91.c | 1 | ||||
-rw-r--r-- | drivers/i2c/chips/isp1301_omap.c | 2 | ||||
-rw-r--r-- | drivers/i2c/i2c-core.c | 18 |
3 files changed, 11 insertions, 10 deletions
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index c1adcdbf7979..9efb02137254 100644 --- a/drivers/i2c/busses/i2c-at91.c +++ b/drivers/i2c/busses/i2c-at91.c | |||
@@ -14,7 +14,6 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/version.h> | ||
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
19 | #include <linux/err.h> | 18 | #include <linux/err.h> |
20 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c index 18355ae2155d..4655b794ebe3 100644 --- a/drivers/i2c/chips/isp1301_omap.c +++ b/drivers/i2c/chips/isp1301_omap.c | |||
@@ -1593,7 +1593,7 @@ fail1: | |||
1593 | if (machine_is_omap_h2()) { | 1593 | if (machine_is_omap_h2()) { |
1594 | /* full speed signaling by default */ | 1594 | /* full speed signaling by default */ |
1595 | isp1301_set_bits(isp, ISP1301_MODE_CONTROL_1, | 1595 | isp1301_set_bits(isp, ISP1301_MODE_CONTROL_1, |
1596 | MC1_SPEED_REG); | 1596 | MC1_SPEED); |
1597 | isp1301_set_bits(isp, ISP1301_MODE_CONTROL_2, | 1597 | isp1301_set_bits(isp, ISP1301_MODE_CONTROL_2, |
1598 | MC2_SPD_SUSP_CTRL); | 1598 | MC2_SPD_SUSP_CTRL); |
1599 | 1599 | ||
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 550853f79ae8..b346a687ab59 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -108,6 +108,9 @@ static int i2c_device_probe(struct device *dev) | |||
108 | if (!driver->probe || !driver->id_table) | 108 | if (!driver->probe || !driver->id_table) |
109 | return -ENODEV; | 109 | return -ENODEV; |
110 | client->driver = driver; | 110 | client->driver = driver; |
111 | if (!device_can_wakeup(&client->dev)) | ||
112 | device_init_wakeup(&client->dev, | ||
113 | client->flags & I2C_CLIENT_WAKE); | ||
111 | dev_dbg(dev, "probe\n"); | 114 | dev_dbg(dev, "probe\n"); |
112 | 115 | ||
113 | status = driver->probe(client, i2c_match_id(driver->id_table, client)); | 116 | status = driver->probe(client, i2c_match_id(driver->id_table, client)); |
@@ -262,9 +265,8 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info) | |||
262 | client->adapter = adap; | 265 | client->adapter = adap; |
263 | 266 | ||
264 | client->dev.platform_data = info->platform_data; | 267 | client->dev.platform_data = info->platform_data; |
265 | device_init_wakeup(&client->dev, info->flags & I2C_CLIENT_WAKE); | ||
266 | 268 | ||
267 | client->flags = info->flags & ~I2C_CLIENT_WAKE; | 269 | client->flags = info->flags; |
268 | client->addr = info->addr; | 270 | client->addr = info->addr; |
269 | client->irq = info->irq; | 271 | client->irq = info->irq; |
270 | 272 | ||
@@ -1188,8 +1190,8 @@ int i2c_probe(struct i2c_adapter *adapter, | |||
1188 | && address_data->normal_i2c[0] == I2C_CLIENT_END) | 1190 | && address_data->normal_i2c[0] == I2C_CLIENT_END) |
1189 | return 0; | 1191 | return 0; |
1190 | 1192 | ||
1191 | dev_warn(&adapter->dev, "SMBus Quick command not supported, " | 1193 | dev_dbg(&adapter->dev, "SMBus Quick command not supported, " |
1192 | "can't probe for chips\n"); | 1194 | "can't probe for chips\n"); |
1193 | return -EOPNOTSUPP; | 1195 | return -EOPNOTSUPP; |
1194 | } | 1196 | } |
1195 | 1197 | ||
@@ -1350,6 +1352,10 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver) | |||
1350 | } | 1352 | } |
1351 | } | 1353 | } |
1352 | 1354 | ||
1355 | /* Stop here if the classes do not match */ | ||
1356 | if (!(adapter->class & driver->class)) | ||
1357 | goto exit_free; | ||
1358 | |||
1353 | /* Stop here if we can't use SMBUS_QUICK */ | 1359 | /* Stop here if we can't use SMBUS_QUICK */ |
1354 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) { | 1360 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) { |
1355 | if (address_data->probe[0] == I2C_CLIENT_END | 1361 | if (address_data->probe[0] == I2C_CLIENT_END |
@@ -1362,10 +1368,6 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver) | |||
1362 | goto exit_free; | 1368 | goto exit_free; |
1363 | } | 1369 | } |
1364 | 1370 | ||
1365 | /* Stop here if the classes do not match */ | ||
1366 | if (!(adapter->class & driver->class)) | ||
1367 | goto exit_free; | ||
1368 | |||
1369 | /* Probe entries are done second, and are not affected by ignore | 1371 | /* Probe entries are done second, and are not affected by ignore |
1370 | entries either */ | 1372 | entries either */ |
1371 | for (i = 0; address_data->probe[i] != I2C_CLIENT_END; i += 2) { | 1373 | for (i = 0; address_data->probe[i] != I2C_CLIENT_END; i += 2) { |