From: Jingoo Han <jg1.han@samsung.com>
To: "'Andrew Morton'" <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, "'Jens Axboe'" <axboe@kernel.dk>,
"'Jingoo Han'" <jg1.han@samsung.com>
Subject: [PATCH 1/2] block: sx8: use module_pci_driver()
Date: Mon, 16 Sep 2013 13:55:49 +0900 [thread overview]
Message-ID: <000101ceb299$03b50b20$0b1f2160$%han@samsung.com> (raw)
Use module_pci_driver() macro which makes the code smaller and
simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/block/sx8.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index 3fb6ab4..7b2ac95 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -1747,17 +1747,4 @@ static void carm_remove_one (struct pci_dev *pdev)
pci_set_drvdata(pdev, NULL);
}
-static int __init carm_init(void)
-{
- return pci_register_driver(&carm_driver);
-}
-
-static void __exit carm_exit(void)
-{
- pci_unregister_driver(&carm_driver);
-}
-
-module_init(carm_init);
-module_exit(carm_exit);
-
-
+module_pci_driver(carm_driver);
--
1.7.10.4
next reply other threads:[~2013-09-16 4:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-16 4:55 Jingoo Han [this message]
2013-09-16 4:56 ` [PATCH 2/2] block: sx8: remove unnecessary pci_set_drvdata() Jingoo Han
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000101ceb299$03b50b20$0b1f2160$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®