media: radio: si470x: Convert to new i2c device probe()
authorKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Wed, 10 Jul 2019 21:51:45 +0000 (18:51 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 13 Aug 2019 14:52:08 +0000 (11:52 -0300)
The I2C core framework provides a simplified probe framework from commit
b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type").

This driver does not utilise the i2c_device_id table in the probe, so we can
easily convert it to utilise the simplified i2c driver registration.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/radio/si470x/radio-si470x-i2c.c

index 7d53422..7541698 100644 (file)
@@ -330,8 +330,7 @@ end:
 /*
  * si470x_i2c_probe - probe for the device
  */
-static int si470x_i2c_probe(struct i2c_client *client,
-                           const struct i2c_device_id *id)
+static int si470x_i2c_probe(struct i2c_client *client)
 {
        struct si470x_device *radio;
        int retval = 0;
@@ -544,7 +543,7 @@ static struct i2c_driver si470x_i2c_driver = {
                .pm             = &si470x_i2c_pm,
 #endif
        },
-       .probe                  = si470x_i2c_probe,
+       .probe_new              = si470x_i2c_probe,
        .remove                 = si470x_i2c_remove,
        .id_table               = si470x_i2c_id,
 };