Skip to content

Commit

Permalink
pwm: pca9685: Convert to i2c's .probe_new()
Browse files Browse the repository at this point in the history
The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Link: https://lore.kernel.org/r/20221118224540.619276-538-uwe@kleine-koenig.org
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
  • Loading branch information
Uwe Kleine-König authored and Thierry Reding committed Dec 6, 2022
1 parent a08b318 commit 8fa22f4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/pwm/pwm-pca9685.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,7 @@ static const struct regmap_config pca9685_regmap_i2c_config = {
.cache_type = REGCACHE_NONE,
};

static int pca9685_pwm_probe(struct i2c_client *client,
const struct i2c_device_id *id)
static int pca9685_pwm_probe(struct i2c_client *client)
{
struct pca9685 *pca;
unsigned int reg;
Expand Down Expand Up @@ -666,7 +665,7 @@ static struct i2c_driver pca9685_i2c_driver = {
.of_match_table = of_match_ptr(pca9685_dt_ids),
.pm = &pca9685_pwm_pm,
},
.probe = pca9685_pwm_probe,
.probe_new = pca9685_pwm_probe,
.remove = pca9685_pwm_remove,
.id_table = pca9685_id,
};
Expand Down

0 comments on commit 8fa22f4

Please sign in to comment.