Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6
* 'next-spi' of git://git.secretlab.ca/git/linux-2.6: spi: spi_txx9.c: use resource_size() spi: spi_sh_sci.c: use resource_size() spi: spi_mpc8xxx.c: use resource_size() spi: spi_bfin5xx.c: use resource_size() spi: atmel_spi.c: use resource_size() spi: Add s3c64xx SPI Controller driver atmel_spi: fix dma addr calculation for len > BUFFER_SIZE spi_s3c24xx: add FIQ pseudo-DMA support spi: controller driver for Designware SPI core spidev: add proper section markers spidev: use DECLARE_BITMAP instead of declaring the array
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
#define SPIDEV_MAJOR 153 /* assigned */
|
||||
#define N_SPI_MINORS 32 /* ... up to 256 */
|
||||
|
||||
static unsigned long minors[N_SPI_MINORS / BITS_PER_LONG];
|
||||
static DECLARE_BITMAP(minors, N_SPI_MINORS);
|
||||
|
||||
|
||||
/* Bit masks for spi_device.mode management. Note that incorrect
|
||||
@@ -558,7 +558,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;
|
||||
int status;
|
||||
@@ -607,7 +607,7 @@ static int spidev_probe(struct spi_device *spi)
|
||||
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);
|
||||
|
||||
@@ -629,7 +629,7 @@ static int spidev_remove(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct spi_driver spidev_spi = {
|
||||
static struct spi_driver spidev_spi_driver = {
|
||||
.driver = {
|
||||
.name = "spidev",
|
||||
.owner = THIS_MODULE,
|
||||
@@ -661,14 +661,14 @@ static int __init spidev_init(void)
|
||||
|
||||
spidev_class = class_create(THIS_MODULE, "spidev");
|
||||
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);
|
||||
}
|
||||
|
||||
status = spi_register_driver(&spidev_spi);
|
||||
status = spi_register_driver(&spidev_spi_driver);
|
||||
if (status < 0) {
|
||||
class_destroy(spidev_class);
|
||||
unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name);
|
||||
unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
@@ -676,9 +676,9 @@ module_init(spidev_init);
|
||||
|
||||
static void __exit spidev_exit(void)
|
||||
{
|
||||
spi_unregister_driver(&spidev_spi);
|
||||
spi_unregister_driver(&spidev_spi_driver);
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user