public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Hennerich <michael.hennerich@analog.com>
To: Axel Lin <axel.lin@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Michael Hennerich <hennerich@blackfin.uclinux.org>,
	Anatolij Gustschin <agust@denx.de>,
	Daniel Mack <zonque@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <greg@kroah.com>,
	"device-drivers-devel@blackfin.uclinux.org" 
	<device-drivers-devel@blackfin.uclinux.org>
Subject: Re: [PATCH 2/2] MISC: convert drivers/misc/* to use module_spi_driver()
Date: Fri, 25 Nov 2011 08:51:17 +0100	[thread overview]
Message-ID: <4ECF48F5.3050706@analog.com> (raw)
In-Reply-To: <1322194579.30842.2.camel@phoenix>

On 11/25/2011 05:16 AM, Axel Lin wrote:
> This patch converts the drivers in drivers/misc/* to use the
> module_spi_driver() macro which makes the code smaller and a bit
> simpler.
>
> Cc: Michael Hennerich<hennerich@blackfin.uclinux.org>
> Cc: Anatolij Gustschin<agust@denx.de>
> Cc: Daniel Mack<zonque@gmail.com>
> Signed-off-by: Axel Lin<axel.lin@gmail.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
> ---
>   drivers/misc/ad525x_dpot-spi.c         |   12 +-----------
>   drivers/misc/eeprom/at25.c             |   12 +-----------
>   drivers/misc/eeprom/eeprom_93xx46.c    |   12 +-----------
>   drivers/misc/lis3lv02d/lis3lv02d_spi.c |   13 +------------
>   drivers/misc/ti_dac7512.c              |   13 +------------
>   5 files changed, 5 insertions(+), 57 deletions(-)
>
> diff --git a/drivers/misc/ad525x_dpot-spi.c b/drivers/misc/ad525x_dpot-spi.c
> index 822749e..f623175 100644
> --- a/drivers/misc/ad525x_dpot-spi.c
> +++ b/drivers/misc/ad525x_dpot-spi.c
> @@ -135,17 +135,7 @@ static struct spi_driver ad_dpot_spi_driver = {
>   	.id_table	= ad_dpot_spi_id,
>   };
>
> -static int __init ad_dpot_spi_init(void)
> -{
> -	return spi_register_driver(&ad_dpot_spi_driver);
> -}
> -module_init(ad_dpot_spi_init);
> -
> -static void __exit ad_dpot_spi_exit(void)
> -{
> -	spi_unregister_driver(&ad_dpot_spi_driver);
> -}
> -module_exit(ad_dpot_spi_exit);
> +module_spi_driver(ad_dpot_spi_driver);
>
>   MODULE_AUTHOR("Michael Hennerich<hennerich@blackfin.uclinux.org>");
>   MODULE_DESCRIPTION("digital potentiometer SPI bus driver");
> diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c
> index c627e41..01ab3c9 100644
> --- a/drivers/misc/eeprom/at25.c
> +++ b/drivers/misc/eeprom/at25.c
> @@ -405,17 +405,7 @@ static struct spi_driver at25_driver = {
>   	.remove		= __devexit_p(at25_remove),
>   };
>
> -static int __init at25_init(void)
> -{
> -	return spi_register_driver(&at25_driver);
> -}
> -module_init(at25_init);
> -
> -static void __exit at25_exit(void)
> -{
> -	spi_unregister_driver(&at25_driver);
> -}
> -module_exit(at25_exit);
> +module_spi_driver(at25_driver);
>
>   MODULE_DESCRIPTION("Driver for most SPI EEPROMs");
>   MODULE_AUTHOR("David Brownell");
> diff --git a/drivers/misc/eeprom/eeprom_93xx46.c b/drivers/misc/eeprom/eeprom_93xx46.c
> index 0c7ebb1..ce3fe36 100644
> --- a/drivers/misc/eeprom/eeprom_93xx46.c
> +++ b/drivers/misc/eeprom/eeprom_93xx46.c
> @@ -392,17 +392,7 @@ static struct spi_driver eeprom_93xx46_driver = {
>   	.remove		= __devexit_p(eeprom_93xx46_remove),
>   };
>
> -static int __init eeprom_93xx46_init(void)
> -{
> -	return spi_register_driver(&eeprom_93xx46_driver);
> -}
> -module_init(eeprom_93xx46_init);
> -
> -static void __exit eeprom_93xx46_exit(void)
> -{
> -	spi_unregister_driver(&eeprom_93xx46_driver);
> -}
> -module_exit(eeprom_93xx46_exit);
> +module_spi_driver(eeprom_93xx46_driver);
>
>   MODULE_LICENSE("GPL");
>   MODULE_DESCRIPTION("Driver for 93xx46 EEPROMs");
> diff --git a/drivers/misc/lis3lv02d/lis3lv02d_spi.c b/drivers/misc/lis3lv02d/lis3lv02d_spi.c
> index b2c1be1..80880e9 100644
> --- a/drivers/misc/lis3lv02d/lis3lv02d_spi.c
> +++ b/drivers/misc/lis3lv02d/lis3lv02d_spi.c
> @@ -126,18 +126,7 @@ static struct spi_driver lis302dl_spi_driver = {
>   	.remove	= __devexit_p(lis302dl_spi_remove),
>   };
>
> -static int __init lis302dl_init(void)
> -{
> -	return spi_register_driver(&lis302dl_spi_driver);
> -}
> -
> -static void __exit lis302dl_exit(void)
> -{
> -	spi_unregister_driver(&lis302dl_spi_driver);
> -}
> -
> -module_init(lis302dl_init);
> -module_exit(lis302dl_exit);
> +module_spi_driver(lis302dl_spi_driver);
>
>   MODULE_AUTHOR("Daniel Mack<daniel@caiaq.de>");
>   MODULE_DESCRIPTION("lis3lv02d SPI glue layer");
> diff --git a/drivers/misc/ti_dac7512.c b/drivers/misc/ti_dac7512.c
> index d3f229a..5acbba1 100644
> --- a/drivers/misc/ti_dac7512.c
> +++ b/drivers/misc/ti_dac7512.c
> @@ -82,20 +82,9 @@ static struct spi_driver dac7512_driver = {
>   	.remove	= __devexit_p(dac7512_remove),
>   };
>
> -static int __init dac7512_init(void)
> -{
> -	return spi_register_driver(&dac7512_driver);
> -}
> -
> -static void __exit dac7512_exit(void)
> -{
> -	spi_unregister_driver(&dac7512_driver);
> -}
> +module_spi_driver(dac7512_driver);
>
>   MODULE_AUTHOR("Daniel Mack<daniel@caiaq.de>");
>   MODULE_DESCRIPTION("DAC7512 16-bit DAC");
>   MODULE_LICENSE("GPL v2");
>   MODULE_VERSION(DRIVER_VERSION);
> -
> -module_init(dac7512_init);
> -module_exit(dac7512_exit);


-- 
Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif



  reply	other threads:[~2011-11-25  7:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-25  4:14 [PATCH 1/2] MISC: convert drivers/misc/* to use module_i2c_driver() Axel Lin
2011-11-25  4:16 ` [PATCH 2/2] MISC: convert drivers/misc/* to use module_spi_driver() Axel Lin
2011-11-25  7:51   ` Michael Hennerich [this message]
2011-11-25  8:30 ` [PATCH 1/2] MISC: convert drivers/misc/* to use module_i2c_driver() Lars-Peter Clausen
2011-11-25 10:15   ` Arnd Bergmann
2011-11-25 10:40     ` Lars-Peter Clausen
2011-11-25 13:58       ` Arnd Bergmann
2011-11-27  4:16 ` Greg KH
2011-11-27 12:01   ` Axel Lin

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=4ECF48F5.3050706@analog.com \
    --to=michael.hennerich@analog.com \
    --cc=agust@denx.de \
    --cc=arnd@arndb.de \
    --cc=axel.lin@gmail.com \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=greg@kroah.com \
    --cc=hennerich@blackfin.uclinux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zonque@gmail.com \
    /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