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 010/606] extcon: usbc-tusb320: 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/extcon/extcon-usbc-tusb320.c | 5 ++---
    1 file changed, 2 insertions(+), 3 deletions(-)

    diff --git a/drivers/extcon/extcon-usbc-tusb320.c b/drivers/extcon/extcon-usbc-tusb320.c
    index 2a120d8d3c27..396a026e0c90 100644
    --- a/drivers/extcon/extcon-usbc-tusb320.c
    +++ b/drivers/extcon/extcon-usbc-tusb320.c
    @@ -421,8 +421,7 @@ static int tusb320_typec_probe(struct i2c_client *client,
    return 0;
    }

    -static int tusb320_probe(struct i2c_client *client,
    - const struct i2c_device_id *id)
    +static int tusb320_probe(struct i2c_client *client)
    {
    struct tusb320_priv *priv;
    const void *match_data;
    @@ -495,7 +494,7 @@ static const struct of_device_id tusb320_extcon_dt_match[] = {
    MODULE_DEVICE_TABLE(of, tusb320_extcon_dt_match);

    static struct i2c_driver tusb320_extcon_driver = {
    - .probe = tusb320_probe,
    + .probe_new = tusb320_probe,
    .driver = {
    .name = "extcon-tusb320",
    .of_match_table = tusb320_extcon_dt_match,
    --
    2.38.1
    \
     
     \ /
      Last update: 2022-11-18 23:47    [W:2.583 / U:0.668 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site