From: Hauke Mehrtens Date: Sun, 25 Dec 2016 14:19:20 +0000 (+0100) Subject: ppc44x: fix build of crypto4xx_core.c X-Git-Tag: v17.01.0-rc1~369 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2e101b5e665204575d9546ac5737fc8d36b715d9;p=openwrt%2Fopenwrt.git ppc44x: fix build of crypto4xx_core.c crypto4xx_probe() is in the __init section and referenced by code form other sections, which causes a build error. Backport a patch from mainline kernel to fix this. Signed-off-by: Hauke Mehrtens --- diff --git a/target/linux/ppc44x/patches-3.18/001-crypto-amcc-remove-incorrect-__init-__exit-markups.patch b/target/linux/ppc44x/patches-3.18/001-crypto-amcc-remove-incorrect-__init-__exit-markups.patch new file mode 100644 index 0000000000..09b6523dca --- /dev/null +++ b/target/linux/ppc44x/patches-3.18/001-crypto-amcc-remove-incorrect-__init-__exit-markups.patch @@ -0,0 +1,46 @@ +From 1eb8a1b340e2f0a562b4987683bbaee4d620bf0a Mon Sep 17 00:00:00 2001 +From: Dmitry Torokhov +Date: Mon, 9 Mar 2015 13:35:39 -0700 +Subject: [PATCH] crypto: amcc - remove incorrect __init/__exit markups + +Even if bus is not hot-pluggable, the devices can be bound and unbound +from the driver via sysfs, so we should not be using __init/__exit +annotations on probe() and remove() methods. The only exception is +drivers registered with platform_driver_probe() which specifically +disables sysfs bind/unbind attributes. + +Signed-off-by: Dmitry Torokhov +Signed-off-by: Herbert Xu +--- + drivers/crypto/amcc/crypto4xx_core.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/crypto/amcc/crypto4xx_core.c ++++ b/drivers/crypto/amcc/crypto4xx_core.c +@@ -1155,7 +1155,7 @@ struct crypto4xx_alg_common crypto4xx_al + /** + * Module Initialization Routine + */ +-static int __init crypto4xx_probe(struct platform_device *ofdev) ++static int crypto4xx_probe(struct platform_device *ofdev) + { + int rc; + struct resource res; +@@ -1263,7 +1263,7 @@ err_alloc_dev: + return rc; + } + +-static int __exit crypto4xx_remove(struct platform_device *ofdev) ++static int crypto4xx_remove(struct platform_device *ofdev) + { + struct device *dev = &ofdev->dev; + struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev); +@@ -1292,7 +1292,7 @@ static struct platform_driver crypto4xx_ + .of_match_table = crypto4xx_match, + }, + .probe = crypto4xx_probe, +- .remove = __exit_p(crypto4xx_remove), ++ .remove = crypto4xx_remove, + }; + + module_platform_driver(crypto4xx_driver);