Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tpm: Drop explicit initialization of struct i2c_device_id::driver_data to 0

These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>

authored by

Uwe Kleine-König and committed by
Jarkko Sakkinen
e5d76ae8 27141f19

+3 -3
+1 -1
drivers/char/tpm/st33zp24/i2c.c
··· 133 133 } 134 134 135 135 static const struct i2c_device_id st33zp24_i2c_id[] = { 136 - {TPM_ST33_I2C, 0}, 136 + { TPM_ST33_I2C }, 137 137 {} 138 138 }; 139 139 MODULE_DEVICE_TABLE(i2c, st33zp24_i2c_id);
+1 -1
drivers/char/tpm/tpm_i2c_atmel.c
··· 186 186 } 187 187 188 188 static const struct i2c_device_id i2c_atmel_id[] = { 189 - {I2C_DRIVER_NAME, 0}, 189 + { I2C_DRIVER_NAME }, 190 190 {} 191 191 }; 192 192 MODULE_DEVICE_TABLE(i2c, i2c_atmel_id);
+1 -1
drivers/char/tpm/tpm_tis_i2c.c
··· 375 375 } 376 376 377 377 static const struct i2c_device_id tpm_tis_i2c_id[] = { 378 - { "tpm_tis_i2c", 0 }, 378 + { "tpm_tis_i2c" }, 379 379 {} 380 380 }; 381 381 MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_id);