Skip to content

Commit 6824f85

Browse files
10ne1jarkkojs
authored andcommitted
char: tpm: cr50_i2c: convert to new probe interface
Way back when this driver was written the I2C framework used to insist an ID table be defined even if the driver did not use it in favor of ACPI/OF matching, so it was added just to placate the hard I2C framework requirement. This is no longer the case so we can drop the table and also convert the driver to the new probe interface. Signed-off-by: Adrian Ratiu <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]>
1 parent 847fdae commit 6824f85

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

drivers/char/tpm/tpm_tis_i2c_cr50.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -639,12 +639,6 @@ static const struct tpm_class_ops cr50_i2c = {
639639
.req_canceled = &tpm_cr50_i2c_req_canceled,
640640
};
641641

642-
static const struct i2c_device_id cr50_i2c_table[] = {
643-
{"cr50_i2c", 0},
644-
{}
645-
};
646-
MODULE_DEVICE_TABLE(i2c, cr50_i2c_table);
647-
648642
#ifdef CONFIG_ACPI
649643
static const struct acpi_device_id cr50_i2c_acpi_id[] = {
650644
{ "GOOG0005", 0 },
@@ -670,8 +664,7 @@ MODULE_DEVICE_TABLE(of, of_cr50_i2c_match);
670664
* - 0: Success.
671665
* - -errno: A POSIX error code.
672666
*/
673-
static int tpm_cr50_i2c_probe(struct i2c_client *client,
674-
const struct i2c_device_id *id)
667+
static int tpm_cr50_i2c_probe(struct i2c_client *client)
675668
{
676669
struct tpm_i2c_cr50_priv_data *priv;
677670
struct device *dev = &client->dev;
@@ -774,8 +767,7 @@ static int tpm_cr50_i2c_remove(struct i2c_client *client)
774767
static SIMPLE_DEV_PM_OPS(cr50_i2c_pm, tpm_pm_suspend, tpm_pm_resume);
775768

776769
static struct i2c_driver cr50_i2c_driver = {
777-
.id_table = cr50_i2c_table,
778-
.probe = tpm_cr50_i2c_probe,
770+
.probe_new = tpm_cr50_i2c_probe,
779771
.remove = tpm_cr50_i2c_remove,
780772
.driver = {
781773
.name = "cr50_i2c",

0 commit comments

Comments
 (0)