mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
i2c: Fix device_init_wakeup place
device_init_wakeup must be called after device_register. Signed-off-by: Marc Pignat <marc.pignat@hevs.ch> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
parent
1941246dd9
commit
ee35425c8e
1 changed files with 4 additions and 2 deletions
|
@ -108,6 +108,9 @@ static int i2c_device_probe(struct device *dev)
|
|||
if (!driver->probe || !driver->id_table)
|
||||
return -ENODEV;
|
||||
client->driver = driver;
|
||||
if (!device_can_wakeup(&client->dev))
|
||||
device_init_wakeup(&client->dev,
|
||||
client->flags & I2C_CLIENT_WAKE);
|
||||
dev_dbg(dev, "probe\n");
|
||||
|
||||
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)
|
|||
client->adapter = adap;
|
||||
|
||||
client->dev.platform_data = info->platform_data;
|
||||
device_init_wakeup(&client->dev, info->flags & I2C_CLIENT_WAKE);
|
||||
|
||||
client->flags = info->flags & ~I2C_CLIENT_WAKE;
|
||||
client->flags = info->flags;
|
||||
client->addr = info->addr;
|
||||
client->irq = info->irq;
|
||||
|
||||
|
|
Loading…
Reference in a new issue