summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2013-06-18 18:02:45 +0200
committerWolfram Sang <wsa@the-dreams.de>2013-06-18 18:02:45 +0200
commit661f6c1cd926c6c973e03c6b5151d161f3a666ed (patch)
treed11ea2978102dce27c325a479be30dbac891433b /drivers/i2c
parentd15b85755b25e1b0201e24bc0c29f31eb4e856c4 (diff)
Revert "i2c: core: make it possible to match a pure device tree driver"
This reverts commit c80f52847c50109ca248c22efbf71ff10553dca4. 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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/i2c-core.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 93fc5bfdb9b..48e31ed69db 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -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,12 +248,7 @@ 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));
+ status = driver->probe(client, i2c_match_id(driver->id_table, client));
if (status) {
client->driver = NULL;
i2c_set_clientdata(client, NULL);