From: Colin Foster <colin.foster@in-advantage.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-kernel@vger.kernel.org, lee@kernel.org
Subject: Re: [PATCH -next] mfd: ocelot-spi: Add missing MODULE_DEVICE_TABLE
Date: Thu, 22 Sep 2022 08:06:05 -0700 [thread overview]
Message-ID: <Yyx53bfj9pIBGKOK@euler> (raw)
In-Reply-To: <20220922103703.1731266-1-yangyingliang@huawei.com>
Hi Yang,
On Thu, Sep 22, 2022 at 06:37:03PM +0800, Yang Yingliang wrote:
> This patch adds missing MODULE_DEVICE_TABLE definition which generates
> correct modalias for automatic loading of this driver when it is built
> as an external module.
>
> Fixes: f3e893626abe ("mfd: ocelot: Add support for the vsc7512 chip via spi")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/mfd/ocelot-spi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mfd/ocelot-spi.c b/drivers/mfd/ocelot-spi.c
> index 0f097f4829d1..2ecd271de2fb 100644
> --- a/drivers/mfd/ocelot-spi.c
> +++ b/drivers/mfd/ocelot-spi.c
> @@ -276,6 +276,7 @@ static const struct spi_device_id ocelot_spi_ids[] = {
> { "vsc7512", 0 },
> { }
> };
> +MODULE_DEVICE_TABLE(spi, ocelot_spi_ids);
>
> static const struct of_device_id ocelot_spi_of_match[] = {
> { .compatible = "mscc,vsc7512" },
> --
> 2.25.1
>
Good catch. I just tested running ocelot-soc as a module and it worked
without your patch. Do you know how I can test the case where it fails?
Thanks
Colin Foster
next prev parent reply other threads:[~2022-09-22 15:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 10:37 [PATCH -next] mfd: ocelot-spi: Add missing MODULE_DEVICE_TABLE Yang Yingliang
2022-09-22 15:06 ` Colin Foster [this message]
2022-09-28 15:10 ` Lee Jones
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=Yyx53bfj9pIBGKOK@euler \
--to=colin.foster@in-advantage.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yangyingliang@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox