Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-110-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
4f218ae0 4fee985a

+3 -4
+3 -4
drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
··· 91 91 /** 92 92 * inv_mpu_probe() - probe function. 93 93 * @client: i2c client. 94 - * @id: i2c device id. 95 94 * 96 95 * Returns 0 on success, a negative error code otherwise. 97 96 */ 98 - static int inv_mpu_probe(struct i2c_client *client, 99 - const struct i2c_device_id *id) 97 + static int inv_mpu_probe(struct i2c_client *client) 100 98 { 99 + const struct i2c_device_id *id = i2c_client_get_device_id(client); 101 100 const void *match; 102 101 struct inv_mpu6050_state *st; 103 102 int result; ··· 259 260 MODULE_DEVICE_TABLE(acpi, inv_acpi_match); 260 261 261 262 static struct i2c_driver inv_mpu_driver = { 262 - .probe = inv_mpu_probe, 263 + .probe_new = inv_mpu_probe, 263 264 .remove = inv_mpu_remove, 264 265 .id_table = inv_mpu_id, 265 266 .driver = {