nfsd: move most of nfsfh.h to fs/nfsd
[safe/jmp/linux-2.6] / drivers / char / nwflash.c
index f9f72a2..8c7df5b 100644 (file)
@@ -58,8 +58,6 @@ static volatile unsigned char *FLASH_BASE;
 static int gbFlashSize = KFLASH_SIZE;
 static DEFINE_MUTEX(nwflash_mutex);
 
-extern spinlock_t gpio_lock;
-
 static int get_flash_id(void)
 {
        volatile unsigned int c1, c2;
@@ -125,15 +123,15 @@ static ssize_t flash_read(struct file *file, char __user *buf, size_t size,
        ssize_t ret;
 
        if (flashdebug)
-               printk(KERN_DEBUG "flash_read: flash_read: offset=0x%lX, "
-                      "buffer=%p, count=0x%X.\n", p, buf, count);
+               printk(KERN_DEBUG "flash_read: flash_read: offset=0x%llx, "
+                      "buffer=%p, count=0x%zx.\n", *ppos, buf, size);
        /*
         * We now lock against reads and writes. --rmk
         */
        if (mutex_lock_interruptible(&nwflash_mutex))
                return -ERESTARTSYS;
 
-       ret = simple_read_from_buffer(buf, size, ppos, FLASH_BASE, gbFlashSize);
+       ret = simple_read_from_buffer(buf, size, ppos, (void *)FLASH_BASE, gbFlashSize);
        mutex_unlock(&nwflash_mutex);
 
        return ret;
@@ -616,9 +614,9 @@ static void kick_open(void)
         * we want to write a bit pattern XXX1 to Xilinx to enable
         * the write gate, which will be open for about the next 2ms.
         */
-       spin_lock_irqsave(&gpio_lock, flags);
-       cpld_modify(1, 1);
-       spin_unlock_irqrestore(&gpio_lock, flags);
+       spin_lock_irqsave(&nw_gpio_lock, flags);
+       nw_cpld_modify(CPLD_FLASH_WR_ENABLE, CPLD_FLASH_WR_ENABLE);
+       spin_unlock_irqrestore(&nw_gpio_lock, flags);
 
        /*
         * let the ISA bus to catch on...