crypto: amcc: remove incorrect __init/__exit markups
PATCH 1/1 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 <[email protected]>
--- drivers/crypto/amcc/crypto4xx_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/crypto/amcc/crypto4xx_core.c +3 -3
@@ -1155,7 +1155,7 @@ struct crypto4xx_alg_common crypto4xx_alg[] = {/** * 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);
@@ -1291,7 +1291,7 @@ static struct platform_driver crypto4xx_driver = { .of_match_table = crypto4xx_match, }, .probe = crypto4xx_probe, - .remove = __exit_p(crypto4xx_remove), + .remove = crypto4xx_remove, };module_platform_driver (crypto4xx_driver);
Signature · 5 lines
2.2.0.rc0.207.ga3a616c -- Dmitry
Quoted 7 lines · Dmitry Torokhov
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()andremove()methods. The only exception is drivers registered withplatform_driver_probe()which specifically disables sysfs bind/unbind attributes.Signed-off-by Dmitry Torokhov <[email protected]>
Applied.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt