]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/sbus/char/vfc_dev.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / drivers / sbus / char / vfc_dev.c
index 7a103698fa3c3a3ea1e9023cbb55b5d7f4b8e1ab..55b2b31bd7abbf0d2dbcde64af303c952b442821 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;
@@ -164,10 +164,6 @@ int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, int instance)
                return -EINVAL;
        if (init_vfc_hw(dev))
                return -EIO;
-
-       devfs_mk_cdev(MKDEV(VFC_MAJOR, instance),
-                       S_IFCHR | S_IRUSR | S_IWUSR,
-                       "vfc/%d", instance);
        return 0;
 }
 
@@ -319,7 +315,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 +619,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,
@@ -677,7 +673,6 @@ static int vfc_probe(void)
                kfree(vfc_dev_lst);
                return -EIO;
        }
-       devfs_mk_dir("vfc");
        instance = 0;
        for_all_sbusdev(sdev, sbus) {
                if (strcmp(sdev->prom_name, "vfc") == 0) {
@@ -717,8 +712,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);
 }
 
@@ -731,7 +725,6 @@ void cleanup_module(void)
        for (devp = vfc_dev_lst; *devp; devp++)
                deinit_vfc_device(*devp);
 
-       devfs_remove("vfc");
        kfree(vfc_dev_lst);
        return;
 }