diff options
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/i2c-core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 550853f79ae8..4ac33670797f 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 | ||