mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
Revert "i2c: core: make it possible to match a pure device tree driver"
This reverts commit c80f52847c
.
Regressions have been found and also run time based instantiation would
fail. We need more thoughts on this.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
d15b85755b
commit
661f6c1cd9
1 changed files with 2 additions and 7 deletions
|
@ -240,7 +240,7 @@ static int i2c_device_probe(struct device *dev)
|
|||
return 0;
|
||||
|
||||
driver = to_i2c_driver(dev->driver);
|
||||
if (!driver->probe || (!driver->id_table && !dev->driver->of_match_table))
|
||||
if (!driver->probe || !driver->id_table)
|
||||
return -ENODEV;
|
||||
client->driver = driver;
|
||||
if (!device_can_wakeup(&client->dev))
|
||||
|
@ -248,11 +248,6 @@ static int i2c_device_probe(struct device *dev)
|
|||
client->flags & I2C_CLIENT_WAKE);
|
||||
dev_dbg(dev, "probe\n");
|
||||
|
||||
if (of_match_device(dev->driver->of_match_table, dev))
|
||||
/* Device tree matching */
|
||||
status = driver->probe(client, NULL);
|
||||
else
|
||||
/* Fall back to matching the id_table */
|
||||
status = driver->probe(client, i2c_match_id(driver->id_table, client));
|
||||
if (status) {
|
||||
client->driver = NULL;
|
||||
|
|
Loading…
Reference in a new issue