Skip to contentSkip to conversation

tpm: remove unused data fields from I2C and OF device ID tables

PATCH Superseded Javier Martinez Canillas 2 participants 2 messages Dec 22, 2017

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tpm: remove unused data fields from I2C and OF device ID tables

The data field for the entries in the device tables are set but not used.

---

 drivers/char/tpm/tpm_i2c_infineon.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/char/tpm/tpm_i2c_infineon.c +6 -6
index 005c38879b2e..19fbd6a3a8e9 100644
@@ -665,9 +665,9 @@ static int tpm_tis_i2c_init(struct device *dev)
 }
 
 static const struct i2c_device_id tpm_tis_i2c_table[] = {
-	{"tpm_i2c_infineon", 0},
-	{"slb9635tt", 0},
-	{"slb9645tt", 1},
+	{"tpm_i2c_infineon" },
+	{"slb9635tt" },
+	{"slb9645tt" },
 	{},
 };
 
@@ -675,9 +675,9 @@ MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_table);
 
 #ifdef CONFIG_OF
 static const struct of_device_id tpm_tis_i2c_of_match[] = {
-	{ .compatible = "infineon,tpm_i2c_infineon", .data = (void *)0 },
-	{ .compatible = "infineon,slb9635tt", .data = (void *)0 },
-	{ .compatible = "infineon,slb9645tt", .data = (void *)1 },
+	{ .compatible = "infineon,tpm_i2c_infineon" },
+	{ .compatible = "infineon,slb9635tt" },
+	{ .compatible = "infineon,slb9645tt" },
 	{},
 };
 MODULE_DEVICE_TABLE(of, tpm_tis_i2c_of_match);
Signature · 1 line
2.14.3
#1 lore raw
Quoted 11 lines · Javier Martinez Canillas

The data field for the entries in the device tables are set but not used.

 drivers/char/tpm/tpm_i2c_infineon.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/char/tpm/tpm_i2c_infineon.c +1 -0
index 005c38879b2e..19fbd6a3a8e9 100644
+++ b/drivers/char/tpm/tpm_i2c_infineon.c

drivers/char/tpm/tpm_i2c_infineon.c static int tpm_tis_i2c_init(struct device *dev) · line 670

Quoted 9 lines
drivers/char/tpm/tpm_i2c_infineon.c +3 -3
@@ -665,9 +665,9 @@ static int tpm_tis_i2c_init(struct device *dev)
 }
 
 static const struct i2c_device_id tpm_tis_i2c_table[] = {
-	{"tpm_i2c_infineon", 0},
-	{"slb9635tt", 0},
-	{"slb9645tt", 1},
+	{"tpm_i2c_infineon" },
+	{"slb9635tt" },
+	{"slb9645tt" },
                   ^^^

The space should go too..

Jason