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

iio: imu: inv_mpu6050: 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>
Acked-by: default avatarJean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-110-uwe@kleine-koenig.orgSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 4fee985a
...@@ -91,13 +91,12 @@ static int inv_mpu_i2c_aux_setup(struct iio_dev *indio_dev) ...@@ -91,13 +91,12 @@ static int inv_mpu_i2c_aux_setup(struct iio_dev *indio_dev)
/** /**
* inv_mpu_probe() - probe function. * inv_mpu_probe() - probe function.
* @client: i2c client. * @client: i2c client.
* @id: i2c device id.
* *
* Returns 0 on success, a negative error code otherwise. * Returns 0 on success, a negative error code otherwise.
*/ */
static int inv_mpu_probe(struct i2c_client *client, static int inv_mpu_probe(struct i2c_client *client)
const struct i2c_device_id *id)
{ {
const struct i2c_device_id *id = i2c_client_get_device_id(client);
const void *match; const void *match;
struct inv_mpu6050_state *st; struct inv_mpu6050_state *st;
int result; int result;
...@@ -260,7 +259,7 @@ static const struct acpi_device_id inv_acpi_match[] = { ...@@ -260,7 +259,7 @@ static const struct acpi_device_id inv_acpi_match[] = {
MODULE_DEVICE_TABLE(acpi, inv_acpi_match); MODULE_DEVICE_TABLE(acpi, inv_acpi_match);
static struct i2c_driver inv_mpu_driver = { static struct i2c_driver inv_mpu_driver = {
.probe = inv_mpu_probe, .probe_new = inv_mpu_probe,
.remove = inv_mpu_remove, .remove = inv_mpu_remove,
.id_table = inv_mpu_id, .id_table = inv_mpu_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