aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-02-22 22:01:33 -0500
committerGrant Likely <grant.likely@secretlab.ca>2011-02-28 03:36:39 -0500
commit4ebb24f707187196937607c60810d42f7112d7aa (patch)
tree89a92b3f8dd55f3c5e0cfa73fa6446b3d490f3a8 /drivers/crypto
parent000061245a6797d542854106463b6b20fbdcb12e (diff)
dt/sparc: Eliminate users of of_platform_{,un}register_driver
Get rid of old users of of_platform_driver in arch/sparc. Most of_platform_driver users can be converted to use the platform_bus directly. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/n2_core.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index 80dc094e78c6..2e5b2044c96f 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -2004,8 +2004,7 @@ static void __devinit n2_spu_driver_version(void)
2004 pr_info("%s", version); 2004 pr_info("%s", version);
2005} 2005}
2006 2006
2007static int __devinit n2_crypto_probe(struct platform_device *dev, 2007static int __devinit n2_crypto_probe(struct platform_device *dev)
2008 const struct of_device_id *match)
2009{ 2008{
2010 struct mdesc_handle *mdesc; 2009 struct mdesc_handle *mdesc;
2011 const char *full_name; 2010 const char *full_name;
@@ -2116,8 +2115,7 @@ static void free_ncp(struct n2_mau *mp)
2116 kfree(mp); 2115 kfree(mp);
2117} 2116}
2118 2117
2119static int __devinit n2_mau_probe(struct platform_device *dev, 2118static int __devinit n2_mau_probe(struct platform_device *dev)
2120 const struct of_device_id *match)
2121{ 2119{
2122 struct mdesc_handle *mdesc; 2120 struct mdesc_handle *mdesc;
2123 const char *full_name; 2121 const char *full_name;
@@ -2211,7 +2209,7 @@ static struct of_device_id n2_crypto_match[] = {
2211 2209
2212MODULE_DEVICE_TABLE(of, n2_crypto_match); 2210MODULE_DEVICE_TABLE(of, n2_crypto_match);
2213 2211
2214static struct of_platform_driver n2_crypto_driver = { 2212static struct platform_driver n2_crypto_driver = {
2215 .driver = { 2213 .driver = {
2216 .name = "n2cp", 2214 .name = "n2cp",
2217 .owner = THIS_MODULE, 2215 .owner = THIS_MODULE,
@@ -2235,7 +2233,7 @@ static struct of_device_id n2_mau_match[] = {
2235 2233
2236MODULE_DEVICE_TABLE(of, n2_mau_match); 2234MODULE_DEVICE_TABLE(of, n2_mau_match);
2237 2235
2238static struct of_platform_driver n2_mau_driver = { 2236static struct platform_driver n2_mau_driver = {
2239 .driver = { 2237 .driver = {
2240 .name = "ncp", 2238 .name = "ncp",
2241 .owner = THIS_MODULE, 2239 .owner = THIS_MODULE,
@@ -2247,20 +2245,20 @@ static struct of_platform_driver n2_mau_driver = {
2247 2245
2248static int __init n2_init(void) 2246static int __init n2_init(void)
2249{ 2247{
2250 int err = of_register_platform_driver(&n2_crypto_driver); 2248 int err = platform_driver_register(&n2_crypto_driver);
2251 2249
2252 if (!err) { 2250 if (!err) {
2253 err = of_register_platform_driver(&n2_mau_driver); 2251 err = platform_driver_register(&n2_mau_driver);
2254 if (err) 2252 if (err)
2255 of_unregister_platform_driver(&n2_crypto_driver); 2253 platform_driver_unregister(&n2_crypto_driver);
2256 } 2254 }
2257 return err; 2255 return err;
2258} 2256}
2259 2257
2260static void __exit n2_exit(void) 2258static void __exit n2_exit(void)
2261{ 2259{
2262 of_unregister_platform_driver(&n2_mau_driver); 2260 platform_driver_unregister(&n2_mau_driver);
2263 of_unregister_platform_driver(&n2_crypto_driver); 2261 platform_driver_unregister(&n2_crypto_driver);
2264} 2262}
2265 2263
2266module_init(n2_init); 2264module_init(n2_init);