]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/raw.c
virtio: virtio_pci should not set bus_id.
[linux-2.6-omap-h63xx.git] / drivers / char / raw.c
index 3b32313f6eb46e7b05911ef48ef6aa48c1e0dfba..bbfa0e241cba38928c8a5b5157a7a2a3ac178d2a 100644 (file)
@@ -75,7 +75,7 @@ static int raw_open(struct inode *inode, struct file *filp)
        filp->f_flags |= O_DIRECT;
        filp->f_mapping = bdev->bd_inode->i_mapping;
        if (++raw_devices[minor].inuse == 1)
-               filp->f_dentry->d_inode->i_mapping =
+               filp->f_path.dentry->d_inode->i_mapping =
                        bdev->bd_inode->i_mapping;
        filp->private_data = bdev;
        mutex_unlock(&raw_mutex);
@@ -154,7 +154,7 @@ static int raw_ctl_ioctl(struct inode *inode, struct file *filp,
                        goto out;
                }
 
-               if (rq.raw_minor < 0 || rq.raw_minor >= MAX_RAW_MINORS) {
+               if (rq.raw_minor <= 0 || rq.raw_minor >= MAX_RAW_MINORS) {
                        err = -EINVAL;
                        goto out;
                }
@@ -255,10 +255,7 @@ static const struct file_operations raw_ctl_fops = {
        .owner  =       THIS_MODULE,
 };
 
-static struct cdev raw_cdev = {
-       .kobj   =       {.name = "raw", },
-       .owner  =       THIS_MODULE,
-};
+static struct cdev raw_cdev;
 
 static int __init raw_init(void)
 {