Commit 8daa9c1d authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Michael Ellerman

macintosh/ams-i2c: Convert to i2c's .probe_new()

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221118224540.619276-290-uwe@kleine-koenig.org
parent 963c7fe6
......@@ -56,8 +56,7 @@ enum ams_i2c_cmd {
AMS_CMD_START,
};
static int ams_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int ams_i2c_probe(struct i2c_client *client);
static void ams_i2c_remove(struct i2c_client *client);
static const struct i2c_device_id ams_id[] = {
......@@ -70,7 +69,7 @@ static struct i2c_driver ams_i2c_driver = {
.driver = {
.name = "ams",
},
.probe = ams_i2c_probe,
.probe_new = ams_i2c_probe,
.remove = ams_i2c_remove,
.id_table = ams_id,
};
......@@ -155,8 +154,7 @@ static void ams_i2c_get_xyz(s8 *x, s8 *y, s8 *z)
*z = ams_i2c_read(AMS_DATAZ);
}
static int ams_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
static int ams_i2c_probe(struct i2c_client *client)
{
int vmaj, vmin;
int result;
......
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