Skip to content

Commit c7f635b

Browse files
Uwe Kleine-Königbroonie
authored andcommitted
spi: sc18is602: 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 <u.kleine-koenig@pengutronix.de> Acked-for-MFD-by: Lee Jones <lee@kernel.org> Acked-for-Backlight-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221118224540.619276-565-uwe@kleine-koenig.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 41948bd commit c7f635b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/spi/spi-sc18is602.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ static int sc18is602_setup(struct spi_device *spi)
235235
return 0;
236236
}
237237

238-
static int sc18is602_probe(struct i2c_client *client,
239-
const struct i2c_device_id *id)
238+
static int sc18is602_probe(struct i2c_client *client)
240239
{
240+
const struct i2c_device_id *id = i2c_client_get_device_id(client);
241241
struct device *dev = &client->dev;
242242
struct device_node *np = dev->of_node;
243243
struct sc18is602_platform_data *pdata = dev_get_platdata(dev);
@@ -337,7 +337,7 @@ static struct i2c_driver sc18is602_driver = {
337337
.name = "sc18is602",
338338
.of_match_table = of_match_ptr(sc18is602_of_match),
339339
},
340-
.probe = sc18is602_probe,
340+
.probe_new = sc18is602_probe,
341341
.id_table = sc18is602_id,
342342
};
343343

0 commit comments

Comments
 (0)