From: Javier Martinez Canillas <javier@osg.samsung.com>
To: linux-kernel@vger.kernel.org
Cc: James Hogan <james.hogan@imgtec.com>,
Ralf Baechle <ralf@linux-mips.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Javier Martinez Canillas <javier@osg.samsung.com>,
Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>,
Paul Burton <paul.burton@imgtec.com>
Subject: [RESEND PATCH 2/2] auxdisplay: img-ascii-lcd: Fix module autoload
Date: Fri, 10 Mar 2017 10:33:07 -0300 [thread overview]
Message-ID: <20170310133307.10254-3-javier@osg.samsung.com> (raw)
In-Reply-To: <20170310133307.10254-1-javier@osg.samsung.com>
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/auxdisplay/img-ascii-lcd.ko | grep alias
$
After this patch:
$ modinfo drivers/auxdisplay/img-ascii-lcd.ko | grep alias
alias: of:N*T*Cmti,sead3-lcdC*
alias: of:N*T*Cmti,sead3-lcd
alias: of:N*T*Cmti,malta-lcdC*
alias: of:N*T*Cmti,malta-lcd
alias: of:N*T*Cimg,boston-lcdC*
alias: of:N*T*Cimg,boston-lcd
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/auxdisplay/img-ascii-lcd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/auxdisplay/img-ascii-lcd.c b/drivers/auxdisplay/img-ascii-lcd.c
index 73bc826144d4..55b792e9275d 100644
--- a/drivers/auxdisplay/img-ascii-lcd.c
+++ b/drivers/auxdisplay/img-ascii-lcd.c
@@ -220,6 +220,7 @@ static const struct of_device_id img_ascii_lcd_matches[] = {
{ .compatible = "mti,sead3-lcd", .data = &sead3_config },
{ /* sentinel */ },
};
+MODULE_DEVICE_TABLE(of, img_ascii_lcd_matches);
/**
* img_ascii_lcd_scroll() - scroll the display by a character
--
2.9.3
prev parent reply other threads:[~2017-03-10 13:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 13:33 [RESEND PATCH 0/2] auxdisplay: img-ascii-lcd: Trivial fixes Javier Martinez Canillas
2017-03-10 13:33 ` [RESEND PATCH 1/2] auxdisplay: img-ascii-lcd: Add a sentinel entry to OF device ID table Javier Martinez Canillas
2017-03-10 18:22 ` Dmitry Torokhov
2017-03-16 18:25 ` Dmitry Torokhov
2017-03-16 18:38 ` Javier Martinez Canillas
2017-03-16 18:41 ` Dmitry Torokhov
2017-03-16 18:48 ` Javier Martinez Canillas
2017-03-10 13:33 ` Javier Martinez Canillas [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=20170310133307.10254-3-javier@osg.samsung.com \
--to=javier@osg.samsung.com \
--cc=akpm@linux-foundation.org \
--cc=dmitry.torokhov@gmail.com \
--cc=james.hogan@imgtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=paul.burton@imgtec.com \
--cc=ralf@linux-mips.org \
/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
all inboxes | Powered by JetHome®