fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / asm-sparc / floppy.h
index 484fae9..9073c84 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)
 
 /* References:
@@ -213,7 +211,7 @@ unsigned long pdma_size;
 volatile int doing_pdma = 0;
 
 /* This is software state */
-char *pdma_base = 0;
+char *pdma_base = NULL;
 unsigned long pdma_areasize;
 
 /* Common routines to all controller types on the Sparc. */
@@ -227,7 +225,7 @@ static __inline__ void sun_fd_disable_dma(void)
        doing_pdma = 0;
        if (pdma_base) {
                mmu_unlockarea(pdma_base, pdma_areasize);
-               pdma_base = 0;
+               pdma_base = NULL;
        }
 }
 
@@ -264,7 +262,7 @@ static __inline__ void sun_fd_enable_dma(void)
 }
 
 /* Our low-level entry point in arch/sparc/kernel/entry.S */
-extern void floppy_hardint(int irq, void *unused, struct pt_regs *regs);
+irqreturn_t floppy_hardint(int irq, void *unused);
 
 static int sun_fd_request_irq(void)
 {
@@ -273,7 +271,8 @@ static int sun_fd_request_irq(void)
 
        if(!once) {
                once = 1;
-               error = request_fast_irq(FLOPPY_IRQ, floppy_hardint, SA_INTERRUPT, "floppy");
+               error = request_fast_irq(FLOPPY_IRQ, floppy_hardint,
+                                        IRQF_DISABLED, "floppy");
                return ((error == 0) ? 0 : -1);
        } else return 0;
 }
@@ -312,8 +311,8 @@ static int sun_floppy_init(void)
        }
 
        /* The sun4m lets us know if the controller is actually usable. */
-       if(sparc_cpu_model == sun4m) {
-               prom_getproperty(fd_node, "status", state, sizeof(state));
+       if(sparc_cpu_model == sun4m &&
+          prom_getproperty(fd_node, "status", state, sizeof(state)) != -1) {
                if(!strcmp(state, "disabled")) {
                        goto no_sun_fdc;
                }