fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / sbus / char / vfc_dev.c
index dfdd6be..386e7de 100644 (file)
@@ -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;
 }
 
@@ -614,7 +610,7 @@ static int vfc_mmap(struct file *file, struct vm_area_struct *vma)
        unsigned int map_size, ret, map_offset;
        struct vfc_dev *dev;
        
-       dev = vfc_get_dev_ptr(iminor(file->f_dentry->d_inode));
+       dev = vfc_get_dev_ptr(iminor(file->f_path.dentry->d_inode));
        if(dev == NULL)
                return -ENODEV;
 
@@ -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,
@@ -663,7 +659,7 @@ static int vfc_probe(void)
        if (!cards)
                return -ENODEV;
 
-       vfc_dev_lst = (struct vfc_dev **)kmalloc(sizeof(struct vfc_dev *) *
+       vfc_dev_lst = kmalloc(sizeof(struct vfc_dev *) *
                                                 (cards+1),
                                                 GFP_KERNEL);
        if (vfc_dev_lst == NULL)
@@ -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,7 +712,6 @@ static void deinit_vfc_device(struct vfc_dev *dev)
 {
        if(dev == NULL)
                return;
-       devfs_remove("vfc/%d", dev->instance);
        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;
 }