Commit a3dc3c9e authored by Axel Lin's avatar Axel Lin Committed by Greg Kroah-Hartman

MISC: convert drivers/misc/* to use module_spi_driver()

This patch converts the drivers in drivers/misc/* to use the
module_spi_driver() macro which makes the code smaller and a bit
simpler.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Daniel Mack <zonque@gmail.com>
Acked-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a64fe2ed
...@@ -135,17 +135,7 @@ static struct spi_driver ad_dpot_spi_driver = { ...@@ -135,17 +135,7 @@ static struct spi_driver ad_dpot_spi_driver = {
.id_table = ad_dpot_spi_id, .id_table = ad_dpot_spi_id,
}; };
static int __init ad_dpot_spi_init(void) module_spi_driver(ad_dpot_spi_driver);
{
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_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
MODULE_DESCRIPTION("digital potentiometer SPI bus driver"); MODULE_DESCRIPTION("digital potentiometer SPI bus driver");
......
...@@ -405,17 +405,7 @@ static struct spi_driver at25_driver = { ...@@ -405,17 +405,7 @@ static struct spi_driver at25_driver = {
.remove = __devexit_p(at25_remove), .remove = __devexit_p(at25_remove),
}; };
static int __init at25_init(void) module_spi_driver(at25_driver);
{
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_DESCRIPTION("Driver for most SPI EEPROMs"); MODULE_DESCRIPTION("Driver for most SPI EEPROMs");
MODULE_AUTHOR("David Brownell"); MODULE_AUTHOR("David Brownell");
......
...@@ -392,17 +392,7 @@ static struct spi_driver eeprom_93xx46_driver = { ...@@ -392,17 +392,7 @@ static struct spi_driver eeprom_93xx46_driver = {
.remove = __devexit_p(eeprom_93xx46_remove), .remove = __devexit_p(eeprom_93xx46_remove),
}; };
static int __init eeprom_93xx46_init(void) module_spi_driver(eeprom_93xx46_driver);
{
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_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Driver for 93xx46 EEPROMs"); MODULE_DESCRIPTION("Driver for 93xx46 EEPROMs");
......
...@@ -126,18 +126,7 @@ static struct spi_driver lis302dl_spi_driver = { ...@@ -126,18 +126,7 @@ static struct spi_driver lis302dl_spi_driver = {
.remove = __devexit_p(lis302dl_spi_remove), .remove = __devexit_p(lis302dl_spi_remove),
}; };
static int __init lis302dl_init(void) module_spi_driver(lis302dl_spi_driver);
{
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_AUTHOR("Daniel Mack <daniel@caiaq.de>"); MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
MODULE_DESCRIPTION("lis3lv02d SPI glue layer"); MODULE_DESCRIPTION("lis3lv02d SPI glue layer");
......
...@@ -82,20 +82,9 @@ static struct spi_driver dac7512_driver = { ...@@ -82,20 +82,9 @@ static struct spi_driver dac7512_driver = {
.remove = __devexit_p(dac7512_remove), .remove = __devexit_p(dac7512_remove),
}; };
static int __init dac7512_init(void) module_spi_driver(dac7512_driver);
{
return spi_register_driver(&dac7512_driver);
}
static void __exit dac7512_exit(void)
{
spi_unregister_driver(&dac7512_driver);
}
MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
MODULE_DESCRIPTION("DAC7512 16-bit DAC"); MODULE_DESCRIPTION("DAC7512 16-bit DAC");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_VERSION(DRIVER_VERSION); MODULE_VERSION(DRIVER_VERSION);
module_init(dac7512_init);
module_exit(dac7512_exit);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment