Skip to content

Commit

Permalink
tpm: tpm_i2c_nuvoton: 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]>
Acked-by: Jarkko Sakkinen <[email protected]>
Signed-off-by: Jarkko Sakkinen <[email protected]>
  • Loading branch information
Uwe Kleine-König authored and jarkkojs committed Feb 13, 2023
1 parent d5ae2f4 commit 8f3fb73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/char/tpm/tpm_i2c_nuvoton.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,9 @@ static int get_vid(struct i2c_client *client, u32 *res)
return 0;
}

static int i2c_nuvoton_probe(struct i2c_client *client,
const struct i2c_device_id *id)
static int i2c_nuvoton_probe(struct i2c_client *client)
{
const struct i2c_device_id *id = i2c_client_get_device_id(client);
int rc;
struct tpm_chip *chip;
struct device *dev = &client->dev;
Expand Down Expand Up @@ -650,7 +650,7 @@ static SIMPLE_DEV_PM_OPS(i2c_nuvoton_pm_ops, tpm_pm_suspend, tpm_pm_resume);

static struct i2c_driver i2c_nuvoton_driver = {
.id_table = i2c_nuvoton_id,
.probe = i2c_nuvoton_probe,
.probe_new = i2c_nuvoton_probe,
.remove = i2c_nuvoton_remove,
.driver = {
.name = "tpm_i2c_nuvoton",
Expand Down

0 comments on commit 8f3fb73

Please sign in to comment.