Skip to content

Commit e5d76ae

Browse files
ukleinekjarkkojs
authored andcommitted
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 <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]>
1 parent 27141f1 commit e5d76ae

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/char/tpm/st33zp24/i2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static void st33zp24_i2c_remove(struct i2c_client *client)
133133
}
134134

135135
static const struct i2c_device_id st33zp24_i2c_id[] = {
136-
{TPM_ST33_I2C, 0},
136+
{ TPM_ST33_I2C },
137137
{}
138138
};
139139
MODULE_DEVICE_TABLE(i2c, st33zp24_i2c_id);

drivers/char/tpm/tpm_i2c_atmel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static void i2c_atmel_remove(struct i2c_client *client)
186186
}
187187

188188
static const struct i2c_device_id i2c_atmel_id[] = {
189-
{I2C_DRIVER_NAME, 0},
189+
{ I2C_DRIVER_NAME },
190190
{}
191191
};
192192
MODULE_DEVICE_TABLE(i2c, i2c_atmel_id);

drivers/char/tpm/tpm_tis_i2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ static void tpm_tis_i2c_remove(struct i2c_client *client)
375375
}
376376

377377
static const struct i2c_device_id tpm_tis_i2c_id[] = {
378-
{ "tpm_tis_i2c", 0 },
378+
{ "tpm_tis_i2c" },
379379
{}
380380
};
381381
MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_id);

0 commit comments

Comments
 (0)