Skip to content

Commit

Permalink
tpm: Drop explicit initialization of struct i2c_device_id::driver_dat…
Browse files Browse the repository at this point in the history
…a 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>
  • Loading branch information
Uwe Kleine-König authored and Jarkko Sakkinen committed Sep 17, 2024
1 parent 27141f1 commit e5d76ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/char/tpm/st33zp24/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static void st33zp24_i2c_remove(struct i2c_client *client)
}

static const struct i2c_device_id st33zp24_i2c_id[] = {
{TPM_ST33_I2C, 0},
{ TPM_ST33_I2C },
{}
};
MODULE_DEVICE_TABLE(i2c, st33zp24_i2c_id);
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/tpm/tpm_i2c_atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static void i2c_atmel_remove(struct i2c_client *client)
}

static const struct i2c_device_id i2c_atmel_id[] = {
{I2C_DRIVER_NAME, 0},
{ I2C_DRIVER_NAME },
{}
};
MODULE_DEVICE_TABLE(i2c, i2c_atmel_id);
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/tpm/tpm_tis_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ static void tpm_tis_i2c_remove(struct i2c_client *client)
}

static const struct i2c_device_id tpm_tis_i2c_id[] = {
{ "tpm_tis_i2c", 0 },
{ "tpm_tis_i2c" },
{}
};
MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_id);
Expand Down

0 comments on commit e5d76ae

Please sign in to comment.