Skip to content

Commit 87feccb

Browse files
Uwe Kleine-Königbroonie
authored andcommitted
regulator: lp872x: Convert to i2c's .probe_new()
.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]> Acked-for-MFD-by: Lee Jones <[email protected]> Acked-for-Backlight-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 7f69edb commit 87feccb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/regulator/lp872x.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,9 @@ static struct lp872x_platform_data
879879
}
880880
#endif
881881

882-
static int lp872x_probe(struct i2c_client *cl, const struct i2c_device_id *id)
882+
static int lp872x_probe(struct i2c_client *cl)
883883
{
884+
const struct i2c_device_id *id = i2c_client_get_device_id(cl);
884885
struct lp872x *lp;
885886
struct lp872x_platform_data *pdata;
886887
int ret;
@@ -946,7 +947,7 @@ static struct i2c_driver lp872x_driver = {
946947
.name = "lp872x",
947948
.of_match_table = of_match_ptr(lp872x_dt_ids),
948949
},
949-
.probe = lp872x_probe,
950+
.probe_new = lp872x_probe,
950951
.id_table = lp872x_ids,
951952
};
952953

0 commit comments

Comments
 (0)