summaryrefslogtreecommitdiff
path: root/drivers/iio/gyro
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-11-18 23:37:07 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-11-23 20:01:41 +0000
commit840ef016c202fc196c91f020750fab08c9a0779f (patch)
treef442a8f3e5d0e8374244b08bcdc35d598f94c471 /drivers/iio/gyro
parent3de8dd69fad2c2ee7ca623d78fb2806d7b8b5a80 (diff)
iio: gyro: bmg160_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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20221118224540.619276-94-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/gyro')
-rw-r--r--drivers/iio/gyro/bmg160_i2c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/gyro/bmg160_i2c.c b/drivers/iio/gyro/bmg160_i2c.c
index 908ccc385254..2b019ee5b2eb 100644
--- a/drivers/iio/gyro/bmg160_i2c.c
+++ b/drivers/iio/gyro/bmg160_i2c.c
@@ -13,9 +13,9 @@ static const struct regmap_config bmg160_regmap_i2c_conf = {
.max_register = 0x3f
};
-static int bmg160_i2c_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int bmg160_i2c_probe(struct i2c_client *client)
{
+ const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct regmap *regmap;
const char *name = NULL;
@@ -70,7 +70,7 @@ static struct i2c_driver bmg160_i2c_driver = {
.of_match_table = bmg160_of_match,
.pm = &bmg160_pm_ops,
},
- .probe = bmg160_i2c_probe,
+ .probe_new = bmg160_i2c_probe,
.remove = bmg160_i2c_remove,
.id_table = bmg160_i2c_id,
};