All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: linux-sound@vger.kernel.org, imx@lists.linux.dev, Frank.Li@kernel.org
Subject: Re: [PATCH] ASoC: imx-audmux: Convert to subsys_platform_driver()
Date: Wed, 04 Nov 2026 11:39:50 +0000	[thread overview]
Message-ID: <sashiko-outbox-197190@kernel.org> (raw)
In-Reply-To: <20261104113228.1634005-1-peng.fan@oss.nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] ASoC: imx-audmux: undefined macro subsys_platform_driver() breaks build
--

commit 9704777f69127c7bff10f89c72ce44590893c56e
Author: Peng Fan <peng.fan@nxp.com>

ASoC: imx-audmux: Convert to subsys_platform_driver()

This commit replaces the open-coded subsys_initcall() and module_exit()
registration of imx_audmux_driver with subsys_platform_driver().

> diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
> index f8335a04595a7..d46f43ab66cf6 100644
> --- a/sound/soc/fsl/imx-audmux.c
> +++ b/sound/soc/fsl/imx-audmux.c
> @@ -361,18 +361,7 @@ static struct platform_driver imx_audmux_driver = {
>  		.of_match_table = imx_audmux_dt_ids,
>  	}
>  };
> -
> -static int __init imx_audmux_init(void)
> -{
> -	return platform_driver_register(&imx_audmux_driver);
> -}
> -subsys_initcall(imx_audmux_init);
> -
> -static void __exit imx_audmux_exit(void)
> -{
> -	platform_driver_unregister(&imx_audmux_driver);
> -}
> -module_exit(imx_audmux_exit);
> +subsys_platform_driver(imx_audmux_driver);

[Severity: High]
Does subsys_platform_driver() exist in the kernel tree?

Looking at include/linux/platform_device.h, only module_platform_driver(),
builtin_platform_driver(), module_platform_driver_probe(), and
builtin_platform_driver_probe() are defined:

    #define module_platform_driver(__platform_driver) \
    	module_driver(__platform_driver, platform_driver_register, \
    			platform_driver_unregister)

    #define builtin_platform_driver(__platform_driver) \
    	builtin_driver(__platform_driver, platform_driver_register)

Because subsys_platform_driver() is not defined anywhere, building
sound/soc/fsl/imx-audmux.c with CONFIG_SND_SOC_IMX_AUDMUX enabled fails to
compile and leaves imx_audmux_driver unregistered. Was this patch depending
on a prerequisite patch that introduces subsys_platform_driver()?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261104113228.1634005-1-peng.fan@oss.nxp.com?part=1

  reply	other threads:[~2026-11-04 11:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 11:32 [PATCH] ASoC: imx-audmux: Convert to subsys_platform_driver() Peng Fan (OSS)
2026-11-04 11:39 ` sashiko-bot [this message]
2026-11-04 12:19 ` Daniel Baluta
2026-11-05  1:07 ` Mark Brown
2026-11-05  2:52 ` Shengjiu Wang

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=sashiko-outbox-197190@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=linux-sound@vger.kernel.org \
    --cc=peng.fan@oss.nxp.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.