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 465/606] mfd: ti-lmu: 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/mfd/ti-lmu.c | 5 +++--
    1 file changed, 3 insertions(+), 2 deletions(-)

    diff --git a/drivers/mfd/ti-lmu.c b/drivers/mfd/ti-lmu.c
    index fd6e8c417baa..9921320be255 100644
    --- a/drivers/mfd/ti-lmu.c
    +++ b/drivers/mfd/ti-lmu.c
    @@ -133,8 +133,9 @@ TI_LMU_DATA(lm3633, LM3633_MAX_REG);
    TI_LMU_DATA(lm3695, LM3695_MAX_REG);
    TI_LMU_DATA(lm36274, LM36274_MAX_REG);

    -static int ti_lmu_probe(struct i2c_client *cl, const struct i2c_device_id *id)
    +static int ti_lmu_probe(struct i2c_client *cl)
    {
    + const struct i2c_device_id *id = i2c_client_get_device_id(cl);
    struct device *dev = &cl->dev;
    const struct ti_lmu_data *data;
    struct regmap_config regmap_cfg;
    @@ -216,7 +217,7 @@ static const struct i2c_device_id ti_lmu_ids[] = {
    MODULE_DEVICE_TABLE(i2c, ti_lmu_ids);

    static struct i2c_driver ti_lmu_driver = {
    - .probe = ti_lmu_probe,
    + .probe_new = ti_lmu_probe,
    .driver = {
    .name = "ti-lmu",
    .of_match_table = ti_lmu_of_match,
    --
    2.38.1
    \
     
     \ /
      Last update: 2022-11-19 00:34    [W:4.016 / U:2.968 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site