|
@@ -1577,7 +1577,6 @@ static int max1363_probe(struct i2c_client *client,
|
|
struct max1363_state *st;
|
|
struct max1363_state *st;
|
|
struct iio_dev *indio_dev;
|
|
struct iio_dev *indio_dev;
|
|
struct regulator *vref;
|
|
struct regulator *vref;
|
|
- const struct of_device_id *match;
|
|
|
|
|
|
|
|
indio_dev = devm_iio_device_alloc(&client->dev,
|
|
indio_dev = devm_iio_device_alloc(&client->dev,
|
|
sizeof(struct max1363_state));
|
|
sizeof(struct max1363_state));
|
|
@@ -1604,11 +1603,8 @@ static int max1363_probe(struct i2c_client *client,
|
|
/* this is only used for device removal purposes */
|
|
/* this is only used for device removal purposes */
|
|
i2c_set_clientdata(client, indio_dev);
|
|
i2c_set_clientdata(client, indio_dev);
|
|
|
|
|
|
- match = of_match_device(of_match_ptr(max1363_of_match),
|
|
|
|
- &client->dev);
|
|
|
|
- if (match)
|
|
|
|
- st->chip_info = of_device_get_match_data(&client->dev);
|
|
|
|
- else
|
|
|
|
|
|
+ st->chip_info = of_device_get_match_data(&client->dev);
|
|
|
|
+ if (!st->chip_info)
|
|
st->chip_info = &max1363_chip_info_tbl[id->driver_data];
|
|
st->chip_info = &max1363_chip_info_tbl[id->driver_data];
|
|
st->client = client;
|
|
st->client = client;
|
|
|
|
|