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 290/606] macintosh: therm_adt746x: 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/macintosh/therm_adt746x.c | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
    index b004ea2a1102..8f5db9093c9a 100644
    --- a/drivers/macintosh/therm_adt746x.c
    +++ b/drivers/macintosh/therm_adt746x.c
    @@ -464,9 +464,9 @@ static void thermostat_remove_files(struct thermostat *th)

    }

    -static int probe_thermostat(struct i2c_client *client,
    - const struct i2c_device_id *id)
    +static int probe_thermostat(struct i2c_client *client)
    {
    + const struct i2c_device_id *id = i2c_client_get_device_id(client);
    struct device_node *np = client->dev.of_node;
    struct thermostat* th;
    const __be32 *prop;
    @@ -598,7 +598,7 @@ static struct i2c_driver thermostat_driver = {
    .driver = {
    .name = "therm_adt746x",
    },
    - .probe = probe_thermostat,
    + .probe_new = probe_thermostat,
    .remove = remove_thermostat,
    .id_table = therm_adt746x_id,
    };
    --
    2.38.1
    \
     
     \ /
      Last update: 2022-11-19 00:26    [W:2.514 / U:0.580 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site