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 178/606] iio: pressure: zpa2326_i2c: Convert to i2c's .probe_new()
    Date
    From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

    .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>
    ---
    drivers/iio/pressure/zpa2326_i2c.c | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/drivers/iio/pressure/zpa2326_i2c.c b/drivers/iio/pressure/zpa2326_i2c.c
    index f26dd8cbb387..ade465014be1 100644
    --- a/drivers/iio/pressure/zpa2326_i2c.c
    +++ b/drivers/iio/pressure/zpa2326_i2c.c
    @@ -38,9 +38,9 @@ static unsigned int zpa2326_i2c_hwid(const struct i2c_client *client)
    (ZPA2326_SA0(client->addr) << ZPA2326_DEVICE_ID_SA0_SHIFT));
    }

    -static int zpa2326_probe_i2c(struct i2c_client *client,
    - const struct i2c_device_id *i2c_id)
    +static int zpa2326_probe_i2c(struct i2c_client *client)
    {
    + const struct i2c_device_id *i2c_id = i2c_client_get_device_id(client);
    struct regmap *regmap;

    regmap = devm_regmap_init_i2c(client, &zpa2326_regmap_i2c_config);
    @@ -76,7 +76,7 @@ static struct i2c_driver zpa2326_i2c_driver = {
    .of_match_table = zpa2326_i2c_matches,
    .pm = ZPA2326_PM_OPS,
    },
    - .probe = zpa2326_probe_i2c,
    + .probe_new = zpa2326_probe_i2c,
    .remove = zpa2326_remove_i2c,
    .id_table = zpa2326_i2c_ids,
    };
    --
    2.38.1
    \
     
     \ /
      Last update: 2022-11-19 00:53    [W:3.538 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site