tpm: fix platform_no_drv_owner.cocci warning
authorYang Li <yang.lee@linux.alibaba.com>
Fri, 1 Jul 2022 09:13:22 +0000 (17:13 +0800)
committerJarkko Sakkinen <jarkko@kernel.org>
Wed, 3 Aug 2022 20:56:20 +0000 (23:56 +0300)
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

Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/tpm_tis_i2c.c

index 8e0686f..ba0911b 100644 (file)
@@ -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),