From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Guennadi Liakhovetski <lg@denx.de>,
Richard Purdie <rpurdie@rpsys.net>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 3/3] leds: Convert leds-dac124s085 to module_spi_driver
Date: Thu, 24 Nov 2011 16:09:57 +0800 [thread overview]
Message-ID: <1322122197.10476.5.camel@phoenix> (raw)
In-Reply-To: <1322122004.10476.1.camel@phoenix>
Factor out some boilerplate code for spi driver registration
into module_spi_driver.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/leds/leds-dac124s085.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/drivers/leds/leds-dac124s085.c b/drivers/leds/leds-dac124s085.c
index 31cf0d6..d56c142 100644
--- a/drivers/leds/leds-dac124s085.c
+++ b/drivers/leds/leds-dac124s085.c
@@ -131,18 +131,7 @@ static struct spi_driver dac124s085_driver = {
},
};
-static int __init dac124s085_leds_init(void)
-{
- return spi_register_driver(&dac124s085_driver);
-}
-
-static void __exit dac124s085_leds_exit(void)
-{
- spi_unregister_driver(&dac124s085_driver);
-}
-
-module_init(dac124s085_leds_init);
-module_exit(dac124s085_leds_exit);
+module_spi_driver(dac124s085_driver);
MODULE_AUTHOR("Guennadi Liakhovetski <lg@denx.de>");
MODULE_DESCRIPTION("DAC124S085 LED driver");
--
1.7.5.4
next prev parent reply other threads:[~2011-11-24 8:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-24 8:06 [PATCH 1/3] leds: Convert led platform drivers to module_platform_driver Axel Lin
2011-11-24 8:08 ` [PATCH 2/3] leds: Convert led i2c drivers to module_i2c_driver Axel Lin
2011-11-24 8:09 ` Axel Lin [this message]
2011-11-24 9:21 ` [PATCH 3/3] leds: Convert leds-dac124s085 to module_spi_driver Guennadi Liakhovetski
2011-11-24 8:14 ` [PATCH 1/3] leds: Convert led platform drivers to module_platform_driver Haojian Zhuang
2011-11-24 10:57 ` Mark Brown
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=1322122197.10476.5.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=lg@denx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.