Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[pandora-kernel.git] / drivers / sbus / char / vfc_dev.c
index 7a10369..ddcd330 100644 (file)
@@ -149,7 +149,7 @@ int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, int instance)
        }
        printk("Initializing vfc%d\n",instance);
        dev->regs = NULL;
-       dev->regs = (volatile struct vfc_regs *)
+       dev->regs = (volatile struct vfc_regs __iomem *)
                sbus_ioremap(&sdev->resource[0], 0,
                             sizeof(struct vfc_regs), vfcstr);
        dev->which_io = sdev->reg_addrs[0].which_io;
@@ -319,7 +319,7 @@ int vfc_capture_poll(struct vfc_dev *dev)
        int timeout = 1000;
 
        while (!timeout--) {
-               if (dev->regs->control & VFC_STATUS_CAPTURE)
+               if (sbus_readl(&dev->regs->control) & VFC_STATUS_CAPTURE)
                        break;
                vfc_i2c_delay_no_busy(dev, 100);
        }
@@ -623,7 +623,7 @@ static int vfc_mmap(struct file *file, struct vm_area_struct *vma)
                map_size = sizeof(struct vfc_regs);
 
        vma->vm_flags |=
-               (VM_SHM | VM_LOCKED | VM_IO | VM_MAYREAD | VM_MAYWRITE | VM_MAYSHARE);
+               (VM_MAYREAD | VM_MAYWRITE | VM_MAYSHARE);
        map_offset = (unsigned int) (long)dev->phys_regs;
        ret = io_remap_pfn_range(vma, vma->vm_start,
                                  MK_IOSPACE_PFN(dev->which_io,
@@ -718,7 +718,7 @@ static void deinit_vfc_device(struct vfc_dev *dev)
        if(dev == NULL)
                return;
        devfs_remove("vfc/%d", dev->instance);
-       sbus_iounmap((unsigned long)dev->regs, sizeof(struct vfc_regs));
+       sbus_iounmap(dev->regs, sizeof(struct vfc_regs));
        kfree(dev);
 }