Skip to contentSkip to conversation

tpm: fix platform_no_drv_owner.cocci warning

PATCH In review Yang Li 2 participants 2 messages Jul 1, 2022 – Jul 11, 2022

Subsystems (2)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 tpm: fix platform_no_drv_owner.cocci warning

Eliminate the following coccicheck warning:
./drivers/char/tpm/tpm_tis_i2c.c:379:3-8: No need to set .owner here. The core will do it.

Remove .owner field if calls are used which set it automatically

---
 drivers/char/tpm/tpm_tis_i2c.c | 1 -
 1 file changed, 1 deletion(-)
drivers/char/tpm/tpm_tis_i2c.c +0 -1
index 8e0686fe4eb1..ba0911b1d1ff 100644
@@ -376,7 +376,6 @@ MODULE_DEVICE_TABLE(of, of_tis_i2c_match);
 
 static struct i2c_driver tpm_tis_i2c_driver = {
 	.driver = {
-		.owner = THIS_MODULE,
 		.name = "tpm_tis_i2c",
 		.pm = &tpm_tis_pm,
 		.of_match_table = of_match_ptr(of_tis_i2c_match),
Signature · 1 line
2.20.1.7.g153144c
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 25 lines · Yang Li

Eliminate the following coccicheck warning:
./drivers/char/tpm/tpm_tis_i2c.c:379:3-8: No need to set .owner here. The core will do it.

Remove .owner field if calls are used which set it automatically

---
 drivers/char/tpm/tpm_tis_i2c.c | 1 -
 1 file changed, 1 deletion(-)
drivers/char/tpm/tpm_tis_i2c.c +0 -1
index 8e0686fe4eb1..ba0911b1d1ff 100644
@@ -376,7 +376,6 @@ MODULE_DEVICE_TABLE(of, of_tis_i2c_match);
 
 static struct i2c_driver tpm_tis_i2c_driver = {
 	.driver = {
-		.owner = THIS_MODULE,
 		.name = "tpm_tis_i2c",
 		.pm = &tpm_tis_pm,
 		.of_match_table = of_match_ptr(of_tis_i2c_match),
Signature · 1 line
2.20.1.7.g153144c

BR, Jarkko