patch-2.1.37 linux/drivers/block/ide-floppy.c

Next file: linux/drivers/block/ide-probe.c
Previous file: linux/drivers/block/ide-disk.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.36/linux/drivers/block/ide-floppy.c linux/drivers/block/ide-floppy.c
@@ -726,7 +726,7 @@
 		return;
 	}
 #ifdef CONFIG_BLK_DEV_TRITON
-	if (clear_bit (PC_DMA_IN_PROGRESS, &pc->flags)) {
+	if (test_and_clear_bit (PC_DMA_IN_PROGRESS, &pc->flags)) {
 		printk (KERN_ERR "ide-floppy: The floppy wants to issue more interrupts in DMA mode\n");
 		printk (KERN_ERR "ide-floppy: DMA disabled, reverting to PIO\n");
 		HWIF(drive)->dmaproc(ide_dma_off, drive);
@@ -842,7 +842,7 @@
 	bcount.all=pc->request_transfer;				/* Request to transfer the entire buffer at once */
 
 #ifdef CONFIG_BLK_DEV_TRITON
-	if (clear_bit (PC_DMA_ERROR, &pc->flags)) {
+	if (test_and_clear_bit (PC_DMA_ERROR, &pc->flags)) {
 		printk (KERN_WARNING "ide-floppy: DMA disabled, reverting to PIO\n");
 		HWIF(drive)->dmaproc(ide_dma_off, drive);
 	}
@@ -1182,7 +1182,7 @@
 {
 	idefloppy_floppy_t *floppy = drive->driver_data;
 	
-	return clear_bit (IDEFLOPPY_MEDIA_CHANGED, &floppy->flags);
+	return test_and_clear_bit (IDEFLOPPY_MEDIA_CHANGED, &floppy->flags);
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov