diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-09-13 21:24:24 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-09-13 21:24:24 +0200 |
commit | 244f7c711cdbd3f9ab35050dc7bc623a54d1dfa0 (patch) | |
tree | 9c8388bb97e504b0cfd370c352c8eecab4816ff3 | |
parent | 8f49f9328ab1e50d99e3b6bec05161d179f6238f (diff) | |
download | cryptodev-linux-244f7c711cdbd3f9ab35050dc7bc623a54d1dfa0.tar.gz cryptodev-linux-244f7c711cdbd3f9ab35050dc7bc623a54d1dfa0.tar.xz cryptodev-linux-244f7c711cdbd3f9ab35050dc7bc623a54d1dfa0.zip |
Fold cryptodev_{de,}register into callers
-rw-r--r-- | cryptodev_main.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/cryptodev_main.c b/cryptodev_main.c index 4b86e84..733e9f1 100644 --- a/cryptodev_main.c +++ b/cryptodev_main.c @@ -429,7 +429,7 @@ static const struct net_proto_family alg_pf = { .owner = THIS_MODULE }; -static int __init cryptodev_register(void) +static int __init init_cryptodev(void) { int rc; @@ -443,38 +443,22 @@ static int __init cryptodev_register(void) if (unlikely(rc != 0)) goto err_proto; + printk(KERN_INFO PFX "driver loaded.\n"); + return 0; err_proto: proto_unregister(&alg_proto); err: - printk(KERN_ERR PFX "registration of /dev/crypto failed\n"); + printk(KERN_ERR PFX "driver registration failed\n"); return rc; } -static void __exit cryptodev_deregister(void) +static void __exit exit_cryptodev(void) { sock_unregister(PF_ALG); proto_unregister(&alg_proto); -} - -/* ====== Module init/exit ====== */ -static int __init init_cryptodev(void) -{ - int rc; - rc = cryptodev_register(); - if (unlikely(rc)) - return rc; - - printk(KERN_INFO PFX "driver loaded.\n"); - - return 0; -} - -static void __exit exit_cryptodev(void) -{ - cryptodev_deregister(); printk(KERN_INFO PFX "driver unloaded.\n"); } |