client->flags & I2C_CLIENT_WAKE);
dev_dbg(dev, "probe\n");
+ acpi_dev_pm_attach(&client->dev, true);
status = driver->probe(client, i2c_match_id(driver->id_table, client));
- if (status)
+ if (status) {
- client->driver = NULL;
i2c_set_clientdata(client, NULL);
-
+ acpi_dev_pm_detach(&client->dev, true);
+ }
return status;
}
dev->driver = NULL;
status = 0;
}
- if (status == 0) {
- client->driver = NULL;
+ if (status == 0)
i2c_set_clientdata(client, NULL);
-
- }
+ acpi_dev_pm_detach(&client->dev, true);
return status;
}