Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / include / asm-m68k / sun3xflop.h
index 6c65cc3..ca8cc41 100644 (file)
 
 /* We don't need no stinkin' I/O port allocation crap. */
 #undef release_region
-#undef check_region
 #undef request_region
 #define release_region(X, Y)   do { } while(0)
-#define check_region(X, Y)     (0)
 #define request_region(X, Y, Z)        (1)
 
 struct sun3xflop_private {
@@ -89,11 +87,11 @@ static void sun3x_82072_fd_outb(unsigned char value, int port)
 
                if(value & 0x10) {
                        fcr |= (FCR_DSEL0 | FCR_MTRON);
-               } else 
+               } else
                        fcr &= ~(FCR_DSEL0 | FCR_MTRON);
-               
-               
-               if(fcr != sun3x_fdc.fcr) { 
+
+
+               if(fcr != sun3x_fdc.fcr) {
                        *(sun3x_fdc.fcr_r) = fcr;
                        sun3x_fdc.fcr = fcr;
                }
@@ -121,7 +119,7 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id,
 #undef TRACE_FLPY_INT
 #define NO_FLOPPY_ASSEMBLER
 
-#ifdef TRACE_FLPY_INT 
+#ifdef TRACE_FLPY_INT
        static int calls=0;
        static int bytes=0;
        static int dma_wait=0;
@@ -142,13 +140,13 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id,
                register int lcount;
                register char *lptr;
 
-               for(lcount=virtual_dma_count, lptr=virtual_dma_addr; 
+               for(lcount=virtual_dma_count, lptr=virtual_dma_addr;
                    lcount; lcount--, lptr++) {
 /*                     st=fd_inb(virtual_dma_port+4) & 0x80 ;  */
                        st = *(sun3x_fdc.status_r);
 /*                     if(st != 0xa0)                  */
 /*                             break;                  */
-       
+
                        if((st & 0x80) == 0) {
                                virtual_dma_count = lcount;
                                virtual_dma_addr = lptr;
@@ -157,7 +155,7 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id,
 
                        if((st & 0x20) == 0)
                                break;
-               
+
                        if(virtual_dma_mode)
 /*                             fd_outb(*lptr, virtual_dma_port+5); */
                                *(sun3x_fdc.data_r) = *lptr;
@@ -165,7 +163,7 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id,
 /*                             *lptr = fd_inb(virtual_dma_port+5); */
                                *lptr = *(sun3x_fdc.data_r);
                }
-               
+
                virtual_dma_count = lcount;
                virtual_dma_addr = lptr;
 /*             st = fd_inb(virtual_dma_port+4);   */
@@ -184,7 +182,7 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id,
                doing_pdma = 0;
 
 #ifdef TRACE_FLPY_INT
-               printk("count=%x, residue=%x calls=%d bytes=%x dma_wait=%d\n", 
+               printk("count=%x, residue=%x calls=%d bytes=%x dma_wait=%d\n",
                       virtual_dma_count, virtual_dma_residue, calls, bytes,
                       dma_wait);
                calls = 0;
@@ -195,7 +193,7 @@ asmlinkage irqreturn_t sun3xflop_hardint(int irq, void *dev_id,
                return IRQ_HANDLED;
        }
 
-       
+
 #ifdef TRACE_FLPY_INT
        if(!virtual_dma_count)
                dma_wait++;
@@ -210,7 +208,8 @@ static int sun3xflop_request_irq(void)
 
        if(!once) {
                once = 1;
-               error = request_irq(FLOPPY_IRQ, sun3xflop_hardint, SA_INTERRUPT, "floppy", 0);
+               error = request_irq(FLOPPY_IRQ, sun3xflop_hardint,
+                                   IRQF_DISABLED, "floppy", NULL);
                return ((error == 0) ? 0 : -1);
        } else return 0;
 }
@@ -232,15 +231,15 @@ static int sun3xflop_init(void)
        if(*sun3x_fdc.status_r == 0xff) {
                return -1;
        }
-       
+
        *sun3x_fdc.fvr_r = FLOPPY_IRQ;
-       
+
        *sun3x_fdc.fcr_r = FCR_TC;
        udelay(10);
        *sun3x_fdc.fcr_r = 0;
 
        /* Success... */
-       floppy_set_flags(0, 1, FD_BROKEN_DCL); // I don't know how to detect this.
+       floppy_set_flags(NULL, 1, FD_BROKEN_DCL); // I don't know how to detect this.
        allowed_drive_mask = 0x01;
        return (int) SUN3X_FDC;
 }
@@ -249,7 +248,7 @@ static int sun3xflop_init(void)
 static int sun3x_eject(void)
 {
        if(MACH_IS_SUN3X) {
-       
+
                sun3x_fdc.fcr |= (FCR_DSEL0 | FCR_EJECT);
                *(sun3x_fdc.fcr_r) = sun3x_fdc.fcr;
                udelay(10);