lkml.org 
[lkml]   [2022]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 289/606] macintosh: ams/ams-i2c: Convert to i2c's .probe_new()
    Date
    From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

    The probe function doesn't make use of the i2c_device_id * parameter so it
    can be trivially converted.

    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    ---
    drivers/macintosh/ams/ams-i2c.c | 8 +++-----
    1 file changed, 3 insertions(+), 5 deletions(-)

    diff --git a/drivers/macintosh/ams/ams-i2c.c b/drivers/macintosh/ams/ams-i2c.c
    index 3ded340699fb..a4a1035eb412 100644
    --- a/drivers/macintosh/ams/ams-i2c.c
    +++ b/drivers/macintosh/ams/ams-i2c.c
    @@ -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;
    --
    2.38.1
    \
     
     \ /
      Last update: 2022-11-19 01:19    [W:2.103 / U:4.476 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site