[PATCH v4 09/20] mfd: Drop unused assignment of platform_device_id driver data
Benson Leung
bleung at chromium.org
Tue Nov 10 15:05:22 PST 2026
On Tue, Nov 10, 2026 at 10:54:34PM +0100, Uwe Kleine-König (The Capable Hub) wrote:
> The drivers explicitly set the .driver_data member of struct
> platform_device_id to zero without relying on that value. Drop these
> unused assignments
>
> This patch doesn't modify the compiled arrays, only their representation
> in source form benefits.
>
> Reviewed-by: Linus Walleij <linusw at kernel.org>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig at baylibre.com>
Reviewed-by: Benson Leung <bleung at chromium.org>
> ---
> drivers/mfd/cros_ec_dev.c | 2 +-
> drivers/mfd/mt6397-core.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
> index 529a23b804f7..96aac158fd8b 100644
> --- a/drivers/mfd/cros_ec_dev.c
> +++ b/drivers/mfd/cros_ec_dev.c
> @@ -379,7 +379,7 @@ static void ec_device_remove(struct platform_device *pdev)
> }
>
> static const struct platform_device_id cros_ec_id[] = {
> - { DRV_NAME, 0 },
> + { DRV_NAME },
> { /* sentinel */ }
> };
> MODULE_DEVICE_TABLE(platform, cros_ec_id);
> diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> index 5d5f816492aa..e74936ac206f 100644
> --- a/drivers/mfd/mt6397-core.c
> +++ b/drivers/mfd/mt6397-core.c
> @@ -435,7 +435,7 @@ static const struct of_device_id mt6397_of_match[] = {
> MODULE_DEVICE_TABLE(of, mt6397_of_match);
>
> static const struct platform_device_id mt6397_id[] = {
> - { "mt6397", 0 },
> + { "mt6397" },
> { },
> };
> MODULE_DEVICE_TABLE(platform, mt6397_id);
> --
> 2.56.0.rc1
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20261110/d37fa5e0/attachment.sig>
More information about the Linux-mediatek
mailing list