linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
	Brian Norris <computersforpeace@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	linux-mtd@lists.infradead.org,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] mtd: nand: omap2: Fix module autoload
Date: Mon, 17 Oct 2016 22:20:00 +0200	[thread overview]
Message-ID: <20161017222000.79b8fe04@bbrezillon> (raw)
In-Reply-To: <1476721177-3425-1-git-send-email-javier@osg.samsung.com>

On Mon, 17 Oct 2016 13:19:37 -0300
Javier Martinez Canillas <javier@osg.samsung.com> wrote:

> If the driver is built as a module, autoload won't work because the module
> alias information is not filled. So user-space can't match the registered
> device with the corresponding module.
> 
> Export the module alias information using the MODULE_DEVICE_TABLE() macro.
> 
> Before this patch:
> 
> $ modinfo drivers/mtd/nand/omap2_nand.ko | grep alias
> alias:          platform:omap2-nand
> 
> After this patch:
> 
> $ modinfo drivers/mtd/nand/omap2_nand.ko | grep alias
> alias:          platform:omap2-nand
> alias:          of:N*T*Cti,omap2-nandC*
> alias:          of:N*T*Cti,omap2-nand
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

Applied.

Thanks,

Boris

> 
> ---
> 
>  drivers/mtd/nand/omap2.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> index 5513bfd9cdc9..0934c3b3f70e 100644
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -2197,6 +2197,7 @@ static const struct of_device_id omap_nand_ids[] = {
>  	{ .compatible = "ti,omap2-nand", },
>  	{},
>  };
> +MODULE_DEVICE_TABLE(of, omap_nand_ids);
>  
>  static struct platform_driver omap_nand_driver = {
>  	.probe		= omap_nand_probe,

      reply	other threads:[~2016-10-17 20:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17 16:19 [PATCH] mtd: nand: omap2: Fix module autoload Javier Martinez Canillas
2016-10-17 20:20 ` Boris Brezillon [this message]

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=20161017222000.79b8fe04@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=javier@osg.samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).