From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
linux-mips@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH v3 10/10] MIPS: DEC: Ensure RTC platform device deregistration upon failure
Date: Mon, 29 Jun 2026 19:12:02 +0200 [thread overview]
Message-ID: <akKnYgr_oc67Tttp@alpha.franken.de> (raw)
In-Reply-To: <alpine.DEB.2.21.2605062333190.46195@angie.orcam.me.uk>
On Wed, May 06, 2026 at 11:43:00PM +0100, Maciej W. Rozycki wrote:
> Switch RTC platform device registration from platform_device_register()
> to platform_add_devices() so as to make sure any failure will result in
> automatic device unregistration.
>
> Fixes: fae67ad43114 ("arch/mips/dec: switch DECstation systems to rtc-cmos")
> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
> ---
> Change from v2,
> <https://lore.kernel.org/r/alpine.DEB.2.21.2605012105320.11074@angie.orcam.me.uk/>:
>
> - Fix a minor style issue in the commit description.
>
> No change from v1 (8/8),
> <https://lore.kernel.org/r/alpine.DEB.2.21.2604110042130.29980@angie.orcam.me.uk/>.
> ---
> arch/mips/dec/platform.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> linux-mips-dec-platform-rtc-unregister.diff
> Index: linux-macro/arch/mips/dec/platform.c
> ===================================================================
> --- linux-macro.orig/arch/mips/dec/platform.c
> +++ linux-macro/arch/mips/dec/platform.c
> @@ -38,6 +38,10 @@ static struct platform_device dec_rtc_de
> .num_resources = ARRAY_SIZE(dec_rtc_resources),
> };
>
> +static struct platform_device *dec_rtc_devices[] __initdata = {
> + &dec_rtc_device,
> +};
> +
> static struct resource dec_dz_resources[] = {
> { .name = "dz", .flags = IORESOURCE_MEM, },
> { .name = "dz", .flags = IORESOURCE_IRQ, },
> @@ -137,7 +141,7 @@ static int __init dec_add_devices(void)
> }
> num_zs = i;
>
> - ret1 = platform_device_register(&dec_rtc_device);
> + ret1 = platform_add_devices(dec_rtc_devices, 1);
> ret2 = IS_ENABLED(CONFIG_32BIT) ?
> platform_add_devices(dec_dz_devices, num_dz) : 0;
> ret3 = platform_add_devices(dec_zs_devices, num_zs);
applied to mips-fixes
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
next prev parent reply other threads:[~2026-06-29 17:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 22:42 [PATCH v3 00/10] MIPS: DEC: Fix serial device regressions + RTC cleanup Maciej W. Rozycki
2026-05-06 22:42 ` [PATCH v3 01/10] MIPS: DEC: Ensure 32-bit stack location for o32 prom_printf() Maciej W. Rozycki
2026-05-26 14:45 ` Thomas Bogendoerfer
2026-05-06 22:42 ` [PATCH v3 02/10] MIPS: DEC: Prevent initial console buffer from landing in XKPHYS Maciej W. Rozycki
2026-05-26 14:46 ` Thomas Bogendoerfer
2026-05-06 22:42 ` [PATCH v3 03/10] serial: dz: Fix bootconsole message clobbering at chip reset Maciej W. Rozycki
2026-05-06 22:42 ` [PATCH v3 04/10] serial: dz: Fix bootconsole handover lockup Maciej W. Rozycki
2026-05-06 22:42 ` [PATCH v3 05/10] serial: zs: " Maciej W. Rozycki
2026-05-06 22:42 ` [PATCH v3 06/10] serial: zs: Switch to using channel reset Maciej W. Rozycki
2026-05-06 22:42 ` [PATCH v3 07/10] serial: dz: Convert to use a platform device Maciej W. Rozycki
2026-05-06 22:42 ` [PATCH v3 08/10] serial: zs: " Maciej W. Rozycki
2026-05-06 22:42 ` [PATCH v3 09/10] serial: dz: Enable modular build Maciej W. Rozycki
2026-05-06 22:43 ` [PATCH v3 10/10] MIPS: DEC: Ensure RTC platform device deregistration upon failure Maciej W. Rozycki
2026-05-26 14:49 ` Thomas Bogendoerfer
2026-06-29 17:12 ` Thomas Bogendoerfer [this message]
2026-05-22 15:15 ` [PATCH v3 00/10] MIPS: DEC: Fix serial device regressions + RTC cleanup Maciej W. Rozycki
2026-05-26 14:48 ` Thomas Bogendoerfer
2026-05-26 15:08 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=akKnYgr_oc67Tttp@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=macro@orcam.me.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.