]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/cdrom/cdrom.c
fix file specification in comments
[linux-2.6-omap-h63xx.git] / drivers / cdrom / cdrom.c
index a59876a0bfa135bcd39d87991a6cb221831010c6..2a0c50d84fc513842aedb86caf313e64cb9d11b9 100644 (file)
@@ -1,4 +1,4 @@
-/* linux/drivers/cdrom/cdrom.c
+/* linux/drivers/cdrom/cdrom.c
    Copyright (c) 1996, 1997 David A. van Leeuwen.
    Copyright (c) 1997, 1998 Erik Andersen <andersee@debian.org>
    Copyright (c) 1998, 1999 Jens Axboe <axboe@image.dk>
 /* #define ERRLOGMASK (CD_WARNING|CD_OPEN|CD_COUNT_TRACKS|CD_CLOSE) */
 /* #define ERRLOGMASK (CD_WARNING|CD_REG_UNREG|CD_DO_IOCTL|CD_OPEN|CD_CLOSE|CD_COUNT_TRACKS) */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/buffer_head.h>
@@ -1009,9 +1008,9 @@ int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, struct file *fp)
                if (fp->f_mode & FMODE_WRITE) {
                        ret = -EROFS;
                        if (cdrom_open_write(cdi))
-                               goto err;
+                               goto err_release;
                        if (!CDROM_CAN(CDC_RAM))
-                               goto err;
+                               goto err_release;
                        ret = 0;
                        cdi->media_written = 0;
                }
@@ -1026,6 +1025,8 @@ int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, struct file *fp)
            not be mounting, but opening with O_NONBLOCK */
        check_disk_change(ip->i_bdev);
        return 0;
+err_release:
+       cdi->ops->release(cdi);
 err:
        cdi->use_count--;
        return ret;
@@ -1836,7 +1837,7 @@ static int dvd_read_bca(struct cdrom_device_info *cdi, dvd_struct *s)
        init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_READ);
        cgc.cmd[0] = GPCMD_READ_DVD_STRUCTURE;
        cgc.cmd[7] = s->type;
-       cgc.cmd[9] = cgc.buflen = 0xff;
+       cgc.cmd[9] = cgc.buflen & 0xff;
 
        if ((ret = cdo->generic_packet(cdi, &cgc)))
                return ret;
@@ -2128,7 +2129,7 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
                rq->cmd[9] = 0xf8;
 
                rq->cmd_len = 12;
-               rq->flags |= REQ_BLOCK_PC;
+               rq->cmd_type = REQ_TYPE_BLOCK_PC;
                rq->timeout = 60 * HZ;
                bio = rq->bio;