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

iio: accel: mma9553: 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-59-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
50434e46 6dae5d11

+3 -3
+3 -3
drivers/iio/accel/mma9553.c
··· 1073 1073 return dev_name(dev); 1074 1074 } 1075 1075 1076 - static int mma9553_probe(struct i2c_client *client, 1077 - const struct i2c_device_id *id) 1076 + static int mma9553_probe(struct i2c_client *client) 1078 1077 { 1078 + const struct i2c_device_id *id = i2c_client_get_device_id(client); 1079 1079 struct mma9553_data *data; 1080 1080 struct iio_dev *indio_dev; 1081 1081 const char *name = NULL; ··· 1246 1246 .acpi_match_table = ACPI_PTR(mma9553_acpi_match), 1247 1247 .pm = pm_ptr(&mma9553_pm_ops), 1248 1248 }, 1249 - .probe = mma9553_probe, 1249 + .probe_new = mma9553_probe, 1250 1250 .remove = mma9553_remove, 1251 1251 .id_table = mma9553_id, 1252 1252 };