Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1502169 > unrolled thread
| Started by | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| First post | 2016-10-17 18:30 +0200 |
| Last post | 2016-10-17 22:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] mtd: nand: omap2: Fix module autoload Javier Martinez Canillas <javier@osg.samsung.com> - 2016-10-17 18:30 +0200
Re: [PATCH] mtd: nand: omap2: Fix module autoload Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-10-17 22:30 +0200
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2016-10-17 18:30 +0200 |
| Subject | [PATCH] mtd: nand: omap2: Fix module autoload |
| Message-ID | <stiXv-5Qr-15@gated-at.bofh.it> |
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>
---
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,
--
2.7.4
[toc] | [next] | [standalone]
| From | Boris Brezillon <boris.brezillon@free-electrons.com> |
|---|---|
| Date | 2016-10-17 22:30 +0200 |
| Message-ID | <stmHM-8sQ-21@gated-at.bofh.it> |
| In reply to | #1502169 |
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,
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web