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 288/606] leds: turris-omnia: 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/leds/leds-turris-omnia.c | 5 ++---
    1 file changed, 2 insertions(+), 3 deletions(-)

    diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c
    index c7c9851c894a..013f551b32b2 100644
    --- a/drivers/leds/leds-turris-omnia.c
    +++ b/drivers/leds/leds-turris-omnia.c
    @@ -201,8 +201,7 @@ static struct attribute *omnia_led_controller_attrs[] = {
    };
    ATTRIBUTE_GROUPS(omnia_led_controller);

    -static int omnia_leds_probe(struct i2c_client *client,
    - const struct i2c_device_id *id)
    +static int omnia_leds_probe(struct i2c_client *client)
    {
    struct device *dev = &client->dev;
    struct device_node *np = dev_of_node(dev), *child;
    @@ -272,7 +271,7 @@ static const struct i2c_device_id omnia_id[] = {
    MODULE_DEVICE_TABLE(i2c, omnia_id);

    static struct i2c_driver omnia_leds_driver = {
    - .probe = omnia_leds_probe,
    + .probe_new = omnia_leds_probe,
    .remove = omnia_leds_remove,
    .id_table = omnia_id,
    .driver = {
    --
    2.38.1
    \
     
     \ /
      Last update: 2022-11-19 00:51    [W:4.019 / U:1.668 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site