Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1503331 > unrolled thread
| Started by | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| First post | 2016-10-18 22:50 +0200 |
| Last post | 2016-10-21 15:40 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] gpio: ts4800: Fix module autoload Javier Martinez Canillas <javier@osg.samsung.com> - 2016-10-18 22:50 +0200
Re: [PATCH 2/2] gpio: ts4800: Fix module autoload Linus Walleij <linus.walleij@linaro.org> - 2016-10-21 15:00 +0200
Re: [PATCH 2/2] gpio: ts4800: Fix module autoload Javier Martinez Canillas <javier@osg.samsung.com> - 2016-10-21 15:40 +0200
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2016-10-18 22:50 +0200 |
| Subject | [PATCH 2/2] gpio: ts4800: Fix module autoload |
| Message-ID | <stJuF-759-3@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/gpio/gpio-ts4800.ko | grep alias
$
After this patch:
$ modinfo drivers/gpio/gpio-ts4800.ko | grep alias
alias: of:N*T*Ctechnologic,ts4800-gpioC*
alias: of:N*T*Ctechnologic,ts4800-gpio
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/gpio/gpio-ts4800.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpio-ts4800.c b/drivers/gpio/gpio-ts4800.c
index 99256115bea5..c2a80b4cbf32 100644
--- a/drivers/gpio/gpio-ts4800.c
+++ b/drivers/gpio/gpio-ts4800.c
@@ -66,6 +66,7 @@ static const struct of_device_id ts4800_gpio_of_match[] = {
{ .compatible = "technologic,ts4800-gpio", },
{},
};
+MODULE_DEVICE_TABLE(of, ts4800_gpio_of_match);
static struct platform_driver ts4800_gpio_driver = {
.driver = {
--
2.7.4
[toc] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2016-10-21 15:00 +0200 |
| Message-ID | <suHAv-5DG-59@gated-at.bofh.it> |
| In reply to | #1503331 |
On Tue, Oct 18, 2016 at 10:44 PM, 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/gpio/gpio-ts4800.ko | grep alias > $ > > After this patch: > > $ modinfo drivers/gpio/gpio-ts4800.ko | grep alias > alias: of:N*T*Ctechnologic,ts4800-gpioC* > alias: of:N*T*Ctechnologic,ts4800-gpio > > Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Patch applied for fixes. Yours, Linus Walleij
[toc] | [prev] | [next] | [standalone]
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2016-10-21 15:40 +0200 |
| Message-ID | <suIdc-67f-37@gated-at.bofh.it> |
| In reply to | #1505887 |
Hello Linus, On 10/21/2016 09:55 AM, Linus Walleij wrote: > On Tue, Oct 18, 2016 at 10:44 PM, 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/gpio/gpio-ts4800.ko | grep alias >> $ >> >> After this patch: >> >> $ modinfo drivers/gpio/gpio-ts4800.ko | grep alias >> alias: of:N*T*Ctechnologic,ts4800-gpioC* >> alias: of:N*T*Ctechnologic,ts4800-gpio >> >> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> > > Patch applied for fixes. > Thanks, I guess this also applies to Patch 1/2? > Yours, > Linus Walleij > Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web