001-crypto-amcc-remove-incorrect-__init-__exit-markups.patch 1.6 KB

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