@@ -192,8 +192,8 @@ static int ltc4306_deselect_mux(struct i2c_mux_core *muxc, u32 chan)
}
static const struct i2c_device_id ltc4306_id[] = {
- { "ltc4305", ltc_4305 },
- { "ltc4306", ltc_4306 },
+ { "ltc4305", .driver_data = (kernel_ulong_t)&chips[ltc_4305] },
+ { "ltc4306", .driver_data = (kernel_ulong_t)&chips[ltc_4306] },
{ }
};
MODULE_DEVICE_TABLE(i2c, ltc4306_id);
@@ -216,10 +216,9 @@ static int ltc4306_probe(struct i2c_client *client)
unsigned int val = 0;
int num, ret;
- chip = of_device_get_match_data(&client->dev);
-
+ chip = i2c_get_match_data(client);
if (!chip)
- chip = &chips[i2c_match_id(ltc4306_id, client)->driver_data];
+ return -ENODEV;
idle_disc = device_property_read_bool(&client->dev,
"i2c-mux-idle-disconnect");