diff mbox

mtd: nand: tango: Export OF device ID table as module aliases

Message ID 20170501203015.7275-1-andresgalacho@gmail.com
State Accepted
Commit 2761b4f12b017f6d3e5add386733a700a490df47
Delegated to: Boris Brezillon
Headers show

Commit Message

Andres Galacho May 1, 2017, 8:30 p.m. UTC
The device table is required to load modules based on
modaliases. After adding MODULE_DEVICE_TABLE, below entries
for example will be added to module.alias:
alias:          of:N*T*Csigma,smp8758-nandC*
alias:          of:N*T*Csigma,smp8758-nand

Signed-off-by: Andres Galacho <andresgalacho@gmail.com>
---
 drivers/mtd/nand/tango_nand.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Brian Norris May 1, 2017, 11:44 p.m. UTC | #1
On Mon, May 01, 2017 at 04:30:15PM -0400, Andres Galacho wrote:
> The device table is required to load modules based on
> modaliases. After adding MODULE_DEVICE_TABLE, below entries
> for example will be added to module.alias:
> alias:          of:N*T*Csigma,smp8758-nandC*
> alias:          of:N*T*Csigma,smp8758-nand
> 
> Signed-off-by: Andres Galacho <andresgalacho@gmail.com>

Acked-by: Brian Norris <computersforpeace@gmail.com>
Boris Brezillon May 15, 2017, 8:47 p.m. UTC | #2
On Mon,  1 May 2017 16:30:15 -0400
Andres Galacho <andresgalacho@gmail.com> wrote:

> The device table is required to load modules based on
> modaliases. After adding MODULE_DEVICE_TABLE, below entries
> for example will be added to module.alias:
> alias:          of:N*T*Csigma,smp8758-nandC*
> alias:          of:N*T*Csigma,smp8758-nand
> 
> Signed-off-by: Andres Galacho <andresgalacho@gmail.com>

Applied to nand/fixes.

Thanks,

Boris

> ---
>  drivers/mtd/nand/tango_nand.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/nand/tango_nand.c b/drivers/mtd/nand/tango_nand.c
> index 05b6e1065203..82fea9b4c358 100644
> --- a/drivers/mtd/nand/tango_nand.c
> +++ b/drivers/mtd/nand/tango_nand.c
> @@ -663,6 +663,7 @@ static const struct of_device_id tango_nand_ids[] = {
>  	{ .compatible = "sigma,smp8758-nand" },
>  	{ /* sentinel */ }
>  };
> +MODULE_DEVICE_TABLE(of, tango_nand_ids);
>  
>  static struct platform_driver tango_nand_driver = {
>  	.probe	= tango_nand_probe,
diff mbox

Patch

diff --git a/drivers/mtd/nand/tango_nand.c b/drivers/mtd/nand/tango_nand.c
index 05b6e1065203..82fea9b4c358 100644
--- a/drivers/mtd/nand/tango_nand.c
+++ b/drivers/mtd/nand/tango_nand.c
@@ -663,6 +663,7 @@  static const struct of_device_id tango_nand_ids[] = {
 	{ .compatible = "sigma,smp8758-nand" },
 	{ /* sentinel */ }
 };
+MODULE_DEVICE_TABLE(of, tango_nand_ids);
 
 static struct platform_driver tango_nand_driver = {
 	.probe	= tango_nand_probe,