* [PATCH v1] platform/x86: apple-gmux: Drop unused assignment of pnp_device_id driver data
@ 2026-06-10 14:32 Uwe Kleine-König (The Capable Hub)
2026-06-11 15:03 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-06-10 14:32 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen; +Cc: platform-driver-x86, linux-kernel
The driver explicitly sets the .driver_data member of struct
pnp_device_id to zero without relying on that value. Drop these unused
assignments.
While touching this array use a named initializer for .id for improved
readability and simplify the list terminator.
This patch doesn't modify the compiled array, only its representation in
source form benefits. The former was confirmed with an x86 build.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
Hello,
I intend to change struct pnp_device_id and for that it's required that
.driver_data is not assigned using a list initializer. Instead of
converting it to a named initializer, drop the assignment as the value
is unused. So this is both a cleanup and a preparation for a later patch
series.
See
https://lore.kernel.org/all/cover.1779878004.git.u.kleine-koenig@baylibre.com/
for a more verbose description on the mentioned change to struct
pnp_device_id (though this is about platform_device_id, but the idea
here is the same).
Best regards
Uwe
drivers/platform/x86/apple-gmux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index fbc30f1f8abd..9c728ac4e045 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -1013,8 +1013,8 @@ static void gmux_remove(struct pnp_dev *pnp)
}
static const struct pnp_device_id gmux_device_ids[] = {
- {GMUX_ACPI_HID, 0},
- {"", 0}
+ { .id = GMUX_ACPI_HID },
+ { }
};
static const struct dev_pm_ops gmux_dev_pm_ops = {
base-commit: 49e02880ec0a8c378e811bc9d85da188d7c6204c
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v1] platform/x86: apple-gmux: Drop unused assignment of pnp_device_id driver data
2026-06-10 14:32 [PATCH v1] platform/x86: apple-gmux: Drop unused assignment of pnp_device_id driver data Uwe Kleine-König (The Capable Hub)
@ 2026-06-11 15:03 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2026-06-11 15:03 UTC (permalink / raw)
To: Hans de Goede, Uwe Kleine-König (The Capable Hub)
Cc: platform-driver-x86, linux-kernel
On Wed, 10 Jun 2026 16:32:59 +0200, Uwe Kleine-König (The Capable Hub) wrote:
> The driver explicitly sets the .driver_data member of struct
> pnp_device_id to zero without relying on that value. Drop these unused
> assignments.
>
> While touching this array use a named initializer for .id for improved
> readability and simplify the list terminator.
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
The list of commits applied:
[1/1] platform/x86: apple-gmux: Drop unused assignment of pnp_device_id driver data
commit: 01ffffc4d0bd5b44a3e5fc07ec232266a1601c45
--
i.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-11 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-10 14:32 [PATCH v1] platform/x86: apple-gmux: Drop unused assignment of pnp_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-06-11 15:03 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®