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 055/606] iio: accel: mma7455_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/accel/mma7455_i2c.c | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/drivers/iio/accel/mma7455_i2c.c b/drivers/iio/accel/mma7455_i2c.c
    index c63b321b01cd..a3864dbe2761 100644
    --- a/drivers/iio/accel/mma7455_i2c.c
    +++ b/drivers/iio/accel/mma7455_i2c.c
    @@ -10,9 +10,9 @@

    #include "mma7455.h"

    -static int mma7455_i2c_probe(struct i2c_client *i2c,
    - const struct i2c_device_id *id)
    +static int mma7455_i2c_probe(struct i2c_client *i2c)
    {
    + const struct i2c_device_id *id = i2c_client_get_device_id(i2c);
    struct regmap *regmap;
    const char *name = NULL;

    @@ -46,7 +46,7 @@ static const struct of_device_id mma7455_of_match[] = {
    MODULE_DEVICE_TABLE(of, mma7455_of_match);

    static struct i2c_driver mma7455_i2c_driver = {
    - .probe = mma7455_i2c_probe,
    + .probe_new = mma7455_i2c_probe,
    .remove = mma7455_i2c_remove,
    .id_table = mma7455_i2c_ids,
    .driver = {
    --
    2.38.1
    \
     
     \ /
      Last update: 2022-11-18 23:50    [W:4.629 / U:2.440 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site