diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/floppy.c | 5 | ||||
-rw-r--r-- | drivers/char/riscom8.c | 2 | ||||
-rw-r--r-- | drivers/spi/au1550_spi.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi_bitbang.c | 8 |
4 files changed, 8 insertions, 11 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 32c79a55511..7652e87d60c 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -217,7 +217,6 @@ static int use_virtual_dma; | |||
217 | */ | 217 | */ |
218 | 218 | ||
219 | static DEFINE_SPINLOCK(floppy_lock); | 219 | static DEFINE_SPINLOCK(floppy_lock); |
220 | static struct completion device_release; | ||
221 | 220 | ||
222 | static unsigned short virtual_dma_port = 0x3f0; | 221 | static unsigned short virtual_dma_port = 0x3f0; |
223 | irqreturn_t floppy_interrupt(int irq, void *dev_id); | 222 | irqreturn_t floppy_interrupt(int irq, void *dev_id); |
@@ -4144,7 +4143,6 @@ DEVICE_ATTR(cmos,S_IRUGO,floppy_cmos_show,NULL); | |||
4144 | 4143 | ||
4145 | static void floppy_device_release(struct device *dev) | 4144 | static void floppy_device_release(struct device *dev) |
4146 | { | 4145 | { |
4147 | complete(&device_release); | ||
4148 | } | 4146 | } |
4149 | 4147 | ||
4150 | static struct platform_device floppy_device[N_DRIVE]; | 4148 | static struct platform_device floppy_device[N_DRIVE]; |
@@ -4539,7 +4537,6 @@ void cleanup_module(void) | |||
4539 | { | 4537 | { |
4540 | int drive; | 4538 | int drive; |
4541 | 4539 | ||
4542 | init_completion(&device_release); | ||
4543 | blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256); | 4540 | blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256); |
4544 | unregister_blkdev(FLOPPY_MAJOR, "fd"); | 4541 | unregister_blkdev(FLOPPY_MAJOR, "fd"); |
4545 | 4542 | ||
@@ -4564,8 +4561,6 @@ void cleanup_module(void) | |||
4564 | 4561 | ||
4565 | /* eject disk, if any */ | 4562 | /* eject disk, if any */ |
4566 | fd_eject(0); | 4563 | fd_eject(0); |
4567 | |||
4568 | wait_for_completion(&device_release); | ||
4569 | } | 4564 | } |
4570 | 4565 | ||
4571 | module_param(floppy, charp, 0); | 4566 | module_param(floppy, charp, 0); |
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index 589ac6f65b9..3f9d0a9ac36 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c | |||
@@ -1709,7 +1709,7 @@ static int __init riscom8_init_module (void) | |||
1709 | 1709 | ||
1710 | if (iobase || iobase1 || iobase2 || iobase3) { | 1710 | if (iobase || iobase1 || iobase2 || iobase3) { |
1711 | for(i = 0; i < RC_NBOARD; i++) | 1711 | for(i = 0; i < RC_NBOARD; i++) |
1712 | rc_board[0].base = 0; | 1712 | rc_board[i].base = 0; |
1713 | } | 1713 | } |
1714 | 1714 | ||
1715 | if (iobase) | 1715 | if (iobase) |
diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c index c47a650183a..41a3d00c451 100644 --- a/drivers/spi/au1550_spi.c +++ b/drivers/spi/au1550_spi.c | |||
@@ -99,7 +99,7 @@ static dbdev_tab_t au1550_spi_mem_dbdev = | |||
99 | static void au1550_spi_bits_handlers_set(struct au1550_spi *hw, int bpw); | 99 | static void au1550_spi_bits_handlers_set(struct au1550_spi *hw, int bpw); |
100 | 100 | ||
101 | 101 | ||
102 | /** | 102 | /* |
103 | * compute BRG and DIV bits to setup spi clock based on main input clock rate | 103 | * compute BRG and DIV bits to setup spi clock based on main input clock rate |
104 | * that was specified in platform data structure | 104 | * that was specified in platform data structure |
105 | * according to au1550 datasheet: | 105 | * according to au1550 datasheet: |
@@ -650,7 +650,7 @@ static int au1550_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t) | |||
650 | return hw->txrx_bufs(spi, t); | 650 | return hw->txrx_bufs(spi, t); |
651 | } | 651 | } |
652 | 652 | ||
653 | static irqreturn_t au1550_spi_irq(int irq, void *dev, struct pt_regs *regs) | 653 | static irqreturn_t au1550_spi_irq(int irq, void *dev) |
654 | { | 654 | { |
655 | struct au1550_spi *hw = dev; | 655 | struct au1550_spi *hw = dev; |
656 | return hw->irq_callback(hw); | 656 | return hw->irq_callback(hw); |
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c index f7f8580edad..71e881419cd 100644 --- a/drivers/spi/spi_bitbang.c +++ b/drivers/spi/spi_bitbang.c | |||
@@ -344,12 +344,14 @@ static void bitbang_work(struct work_struct *work) | |||
344 | t->rx_dma = t->tx_dma = 0; | 344 | t->rx_dma = t->tx_dma = 0; |
345 | status = bitbang->txrx_bufs(spi, t); | 345 | status = bitbang->txrx_bufs(spi, t); |
346 | } | 346 | } |
347 | if (status > 0) | ||
348 | m->actual_length += status; | ||
347 | if (status != t->len) { | 349 | if (status != t->len) { |
348 | if (status > 0) | 350 | /* always report some kind of error */ |
349 | status = -EMSGSIZE; | 351 | if (status >= 0) |
352 | status = -EREMOTEIO; | ||
350 | break; | 353 | break; |
351 | } | 354 | } |
352 | m->actual_length += status; | ||
353 | status = 0; | 355 | status = 0; |
354 | 356 | ||
355 | /* protocol tweaks before next transfer */ | 357 | /* protocol tweaks before next transfer */ |