Skip to content

Commit

Permalink
leds: lm355x: Convert to i2c's .probe_new()
Browse files Browse the repository at this point in the history
.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 <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Uwe Kleine-König authored and lag-linaro committed Jan 30, 2023
1 parent 912bcc8 commit 0712cb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/leds/leds-lm355x.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,9 @@ static const struct regmap_config lm355x_regmap = {
};

/* module initialize */
static int lm355x_probe(struct i2c_client *client,
const struct i2c_device_id *id)
static int lm355x_probe(struct i2c_client *client)
{
const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct lm355x_platform_data *pdata = dev_get_platdata(&client->dev);
struct lm355x_chip_data *chip;

Expand Down Expand Up @@ -516,7 +516,7 @@ static struct i2c_driver lm355x_i2c_driver = {
.name = LM355x_NAME,
.pm = NULL,
},
.probe = lm355x_probe,
.probe_new = lm355x_probe,
.remove = lm355x_remove,
.id_table = lm355x_id,
};
Expand Down

0 comments on commit 0712cb9

Please sign in to comment.