diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2013-06-18 12:02:45 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-06-18 12:02:45 -0400 |
commit | 661f6c1cd926c6c973e03c6b5151d161f3a666ed (patch) | |
tree | d11ea2978102dce27c325a479be30dbac891433b /drivers/i2c | |
parent | d15b85755b25e1b0201e24bc0c29f31eb4e856c4 (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.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 93fc5bfdb9b4..48e31ed69dbf 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) | |||
240 | return 0; | 240 | return 0; |
241 | 241 | ||
242 | driver = to_i2c_driver(dev->driver); | 242 | driver = to_i2c_driver(dev->driver); |
243 | if (!driver->probe || (!driver->id_table && !dev->driver->of_match_table)) | 243 | if (!driver->probe || !driver->id_table) |
244 | return -ENODEV; | 244 | return -ENODEV; |
245 | client->driver = driver; | 245 | client->driver = driver; |
246 | if (!device_can_wakeup(&client->dev)) | 246 | if (!device_can_wakeup(&client->dev)) |
@@ -248,12 +248,7 @@ static int i2c_device_probe(struct device *dev) | |||
248 | client->flags & I2C_CLIENT_WAKE); | 248 | client->flags & I2C_CLIENT_WAKE); |
249 | dev_dbg(dev, "probe\n"); | 249 | dev_dbg(dev, "probe\n"); |
250 | 250 | ||
251 | if (of_match_device(dev->driver->of_match_table, dev)) | 251 | status = driver->probe(client, i2c_match_id(driver->id_table, client)); |
252 | /* Device tree matching */ | ||
253 | status = driver->probe(client, NULL); | ||
254 | else | ||
255 | /* Fall back to matching the id_table */ | ||
256 | status = driver->probe(client, i2c_match_id(driver->id_table, client)); | ||
257 | if (status) { | 252 | if (status) { |
258 | client->driver = NULL; | 253 | client->driver = NULL; |
259 | i2c_set_clientdata(client, NULL); | 254 | i2c_set_clientdata(client, NULL); |