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 078/606] iio: chemical: scd4x: 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/iio/chemical/scd4x.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/iio/chemical/scd4x.c b/drivers/iio/chemical/scd4x.c
    index 54066532ea45..f7ed9455b3c8 100644
    --- a/drivers/iio/chemical/scd4x.c
    +++ b/drivers/iio/chemical/scd4x.c
    @@ -615,7 +615,7 @@ static irqreturn_t scd4x_trigger_handler(int irq, void *p)
    return IRQ_HANDLED;
    }

    -static int scd4x_probe(struct i2c_client *client, const struct i2c_device_id *id)
    +static int scd4x_probe(struct i2c_client *client)
    {
    static const unsigned long scd4x_scan_masks[] = { 0x07, 0x00 };
    struct device *dev = &client->dev;
    @@ -690,7 +690,7 @@ static struct i2c_driver scd4x_i2c_driver = {
    .of_match_table = scd4x_dt_ids,
    .pm = pm_sleep_ptr(&scd4x_pm_ops),
    },
    - .probe = scd4x_probe,
    + .probe_new = scd4x_probe,
    };
    module_i2c_driver(scd4x_i2c_driver);

    --
    2.38.1
    \
     
     \ /
      Last update: 2022-11-19 00:39    [W:2.518 / U:0.076 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site