Re: [PATCH v2 6/6] firmware: raspberrypi: Store child devices in struct rpi_firmware
From: Sander Speetjens
Date: Mon Nov 09 2026 - 00:56:20 EST
Hi Stefan,
On 11/8/26 22:06, Stefan Wahren wrote:
Hi Sander,
Am 07.11.26 um 19:21 schrieb Sander Speetjens:
The hwmon and clock platform devices were kept in global variables.
Move them into struct rpi_firmware so each instance owns its own
children and their lifetimes are correctly paired with the parent.
Also check the return value of platform_device_register_data() so that
an error pointer is never stored. The child devices are optional; do
not propagate registration failures so the main firmware interface
remains available.
Signed-off-by: Sander Speetjens <sander.speetjens@xxxxxxxxx>
the first version of this patch contained fixes tags, but they were dropped without mention it in the cover letter.
I was not 100% sure if the commit needed them. If you say that it is needed, I will add it again.
Kind regards
Sander Speetjens