Commit b97db528 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Jonathan Cameron

iio: gyro: mpu3050-i2c: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-96-uwe@kleine-koenig.orgSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 83128410
...@@ -32,9 +32,9 @@ static int mpu3050_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id) ...@@ -32,9 +32,9 @@ static int mpu3050_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id)
return 0; return 0;
} }
static int mpu3050_i2c_probe(struct i2c_client *client, static int mpu3050_i2c_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct regmap *regmap; struct regmap *regmap;
const char *name; const char *name;
struct mpu3050 *mpu3050; struct mpu3050 *mpu3050;
...@@ -108,7 +108,7 @@ static const struct of_device_id mpu3050_i2c_of_match[] = { ...@@ -108,7 +108,7 @@ static const struct of_device_id mpu3050_i2c_of_match[] = {
MODULE_DEVICE_TABLE(of, mpu3050_i2c_of_match); MODULE_DEVICE_TABLE(of, mpu3050_i2c_of_match);
static struct i2c_driver mpu3050_i2c_driver = { static struct i2c_driver mpu3050_i2c_driver = {
.probe = mpu3050_i2c_probe, .probe_new = mpu3050_i2c_probe,
.remove = mpu3050_i2c_remove, .remove = mpu3050_i2c_remove,
.id_table = mpu3050_i2c_id, .id_table = mpu3050_i2c_id,
.driver = { .driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment