diff options
| -rw-r--r-- | drivers/i2c/muxes/i2c-mux-pca954x.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index fe20b8ec5247..fbc748027087 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c | |||
| @@ -374,7 +374,6 @@ static int pca954x_probe(struct i2c_client *client, | |||
| 374 | int num, force, class; | 374 | int num, force, class; |
| 375 | struct i2c_mux_core *muxc; | 375 | struct i2c_mux_core *muxc; |
| 376 | struct pca954x *data; | 376 | struct pca954x *data; |
| 377 | const struct of_device_id *match; | ||
| 378 | int ret; | 377 | int ret; |
| 379 | 378 | ||
| 380 | if (!i2c_check_functionality(adap, I2C_FUNC_SMBUS_BYTE)) | 379 | if (!i2c_check_functionality(adap, I2C_FUNC_SMBUS_BYTE)) |
| @@ -401,10 +400,8 @@ static int pca954x_probe(struct i2c_client *client, | |||
| 401 | udelay(1); | 400 | udelay(1); |
| 402 | } | 401 | } |
| 403 | 402 | ||
| 404 | match = of_match_device(of_match_ptr(pca954x_of_match), &client->dev); | 403 | data->chip = of_device_get_match_data(&client->dev); |
| 405 | if (match) | 404 | if (!data->chip) |
| 406 | data->chip = of_device_get_match_data(&client->dev); | ||
| 407 | else | ||
| 408 | data->chip = &chips[id->driver_data]; | 405 | data->chip = &chips[id->driver_data]; |
| 409 | 406 | ||
| 410 | if (data->chip->id.manufacturer_id != I2C_DEVICE_ID_NONE) { | 407 | if (data->chip->id.manufacturer_id != I2C_DEVICE_ID_NONE) { |
