ppc44x: fix build of crypto4xx_core.c
[openwrt/staging/blogic.git] / target / linux / ppc44x / patches-3.18 / 001-crypto-amcc-remove-incorrect-__init-__exit-markups.patch
1 From 1eb8a1b340e2f0a562b4987683bbaee4d620bf0a Mon Sep 17 00:00:00 2001
2 From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
3 Date: Mon, 9 Mar 2015 13:35:39 -0700
4 Subject: [PATCH] crypto: amcc - remove incorrect __init/__exit markups
5
6 Even if bus is not hot-pluggable, the devices can be bound and unbound
7 from the driver via sysfs, so we should not be using __init/__exit
8 annotations on probe() and remove() methods. The only exception is
9 drivers registered with platform_driver_probe() which specifically
10 disables sysfs bind/unbind attributes.
11
12 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
13 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
14 ---
15 drivers/crypto/amcc/crypto4xx_core.c | 6 +++---
16 1 file changed, 3 insertions(+), 3 deletions(-)
17
18 --- a/drivers/crypto/amcc/crypto4xx_core.c
19 +++ b/drivers/crypto/amcc/crypto4xx_core.c
20 @@ -1155,7 +1155,7 @@ struct crypto4xx_alg_common crypto4xx_al
21 /**
22 * Module Initialization Routine
23 */
24 -static int __init crypto4xx_probe(struct platform_device *ofdev)
25 +static int crypto4xx_probe(struct platform_device *ofdev)
26 {
27 int rc;
28 struct resource res;
29 @@ -1263,7 +1263,7 @@ err_alloc_dev:
30 return rc;
31 }
32
33 -static int __exit crypto4xx_remove(struct platform_device *ofdev)
34 +static int crypto4xx_remove(struct platform_device *ofdev)
35 {
36 struct device *dev = &ofdev->dev;
37 struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev);
38 @@ -1292,7 +1292,7 @@ static struct platform_driver crypto4xx_
39 .of_match_table = crypto4xx_match,
40 },
41 .probe = crypto4xx_probe,
42 - .remove = __exit_p(crypto4xx_remove),
43 + .remove = crypto4xx_remove,
44 };
45
46 module_platform_driver(crypto4xx_driver);