Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1549253

[PATCH] crypto: picoxcell - Fix module autoload for non-OF registration

From Javier Martinez Canillas <javier@osg.samsung.com>
Newsgroups linux.kernel
Subject [PATCH] crypto: picoxcell - Fix module autoload for non-OF registration
Date 2017-01-02 16:40 +0100
Message-ID <sVcSl-n5-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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 if the device isn't registered via OF.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/crypto/picoxcell_crypto.ko | grep alias
alias:          of:N*T*Cpicochip,spacc-l2C*
alias:          of:N*T*Cpicochip,spacc-l2
alias:          of:N*T*Cpicochip,spacc-ipsecC*
alias:          of:N*T*Cpicochip,spacc-ipsec

After this patch:

$ modinfo drivers/crypto/picoxcell_crypto.ko | grep alias
alias:          of:N*T*Cpicochip,spacc-l2C*
alias:          of:N*T*Cpicochip,spacc-l2
alias:          of:N*T*Cpicochip,spacc-ipsecC*
alias:          of:N*T*Cpicochip,spacc-ipsec
alias:          platform:picochip,spacc-l2
alias:          platform:picochip,spacc-ipsec

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/crypto/picoxcell_crypto.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c
index 47576098831f..64449b7c00af 100644
--- a/drivers/crypto/picoxcell_crypto.c
+++ b/drivers/crypto/picoxcell_crypto.c
@@ -1808,6 +1808,7 @@ static const struct platform_device_id spacc_id_table[] = {
 	{ "picochip,spacc-l2", },
 	{ }
 };
+MODULE_DEVICE_TABLE(platform, spacc_id_table);
 
 static struct platform_driver spacc_driver = {
 	.probe		= spacc_probe,
-- 
2.7.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] crypto: picoxcell - Fix module autoload for non-OF registration Javier Martinez Canillas <javier@osg.samsung.com> - 2017-01-02 16:40 +0100
  Re: [PATCH] crypto: picoxcell - Fix module autoload for non-OF registration Arnd Bergmann <arnd@arndb.de> - 2017-01-02 17:10 +0100
    Re: [PATCH] crypto: picoxcell - Fix module autoload for non-OF  registration Javier Martinez Canillas <javier@osg.samsung.com> - 2017-01-02 17:20 +0100
      Re: [PATCH] crypto: picoxcell - Fix module autoload for non-OF registration Arnd Bergmann <arnd@arndb.de> - 2017-01-02 17:30 +0100
        Re: [PATCH] crypto: picoxcell - Fix module autoload for non-OF  registration Javier Martinez Canillas <javier@osg.samsung.com> - 2017-01-02 17:40 +0100

csiph-web