spidev: add proper section markers
The driver already uses __devexit_p() in the structure, but looks like actual __dev{init,exit} markings were forgotten. The spidev_spi driver also needs renaming to include a "_driver" suffix to avoid section mismatch warnings. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
committed by
Grant Likely
parent
8ae1c92480
commit
db389b6143
@@ -561,7 +561,7 @@ static struct class *spidev_class;
|
|||||||
|
|
||||||
/*-------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------*/
|
||||||
|
|
||||||
static int spidev_probe(struct spi_device *spi)
|
static int __devinit spidev_probe(struct spi_device *spi)
|
||||||
{
|
{
|
||||||
struct spidev_data *spidev;
|
struct spidev_data *spidev;
|
||||||
int status;
|
int status;
|
||||||
@@ -610,7 +610,7 @@ static int spidev_probe(struct spi_device *spi)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int spidev_remove(struct spi_device *spi)
|
static int __devexit spidev_remove(struct spi_device *spi)
|
||||||
{
|
{
|
||||||
struct spidev_data *spidev = spi_get_drvdata(spi);
|
struct spidev_data *spidev = spi_get_drvdata(spi);
|
||||||
|
|
||||||
@@ -632,7 +632,7 @@ static int spidev_remove(struct spi_device *spi)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct spi_driver spidev_spi = {
|
static struct spi_driver spidev_spi_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "spidev",
|
.name = "spidev",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
@@ -664,14 +664,14 @@ static int __init spidev_init(void)
|
|||||||
|
|
||||||
spidev_class = class_create(THIS_MODULE, "spidev");
|
spidev_class = class_create(THIS_MODULE, "spidev");
|
||||||
if (IS_ERR(spidev_class)) {
|
if (IS_ERR(spidev_class)) {
|
||||||
unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name);
|
unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
|
||||||
return PTR_ERR(spidev_class);
|
return PTR_ERR(spidev_class);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = spi_register_driver(&spidev_spi);
|
status = spi_register_driver(&spidev_spi_driver);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
class_destroy(spidev_class);
|
class_destroy(spidev_class);
|
||||||
unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name);
|
unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@@ -679,9 +679,9 @@ module_init(spidev_init);
|
|||||||
|
|
||||||
static void __exit spidev_exit(void)
|
static void __exit spidev_exit(void)
|
||||||
{
|
{
|
||||||
spi_unregister_driver(&spidev_spi);
|
spi_unregister_driver(&spidev_spi_driver);
|
||||||
class_destroy(spidev_class);
|
class_destroy(spidev_class);
|
||||||
unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name);
|
unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
|
||||||
}
|
}
|
||||||
module_exit(spidev_exit);
|
module_exit(spidev_exit);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user