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 526/606] power: supply: ltc4162-l: 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/power/supply/ltc4162-l-charger.c | 5 ++---
    1 file changed, 2 insertions(+), 3 deletions(-)

    diff --git a/drivers/power/supply/ltc4162-l-charger.c b/drivers/power/supply/ltc4162-l-charger.c
    index 1a5cb4405ee3..db2bb5233570 100644
    --- a/drivers/power/supply/ltc4162-l-charger.c
    +++ b/drivers/power/supply/ltc4162-l-charger.c
    @@ -819,8 +819,7 @@ static void ltc4162l_clear_interrupts(struct ltc4162l_info *info)
    regmap_write(info->regmap, LTC4162L_CHARGE_STATUS_ALERTS_REG, 0);
    }

    -static int ltc4162l_probe(struct i2c_client *client,
    - const struct i2c_device_id *id)
    +static int ltc4162l_probe(struct i2c_client *client)
    {
    struct i2c_adapter *adapter = client->adapter;
    struct device *dev = &client->dev;
    @@ -916,7 +915,7 @@ static const struct of_device_id ltc4162l_of_match[] = {
    MODULE_DEVICE_TABLE(of, ltc4162l_of_match);

    static struct i2c_driver ltc4162l_driver = {
    - .probe = ltc4162l_probe,
    + .probe_new = ltc4162l_probe,
    .alert = ltc4162l_alert,
    .id_table = ltc4162l_i2c_id_table,
    .driver = {
    --
    2.38.1
    \
     
     \ /
      Last update: 2022-11-19 00:40    [W:4.020 / U:0.556 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site