]> Pileus Git - ~andy/linux/blobdiff - drivers/block/pktcdvd.c
devres: release resources on device_del()
[~andy/linux] / drivers / block / pktcdvd.c
index c0e89490e3d5c97427eaf2eeb15c42bb672b037f..a4fb7038318817d02b6d39f83c5ccf8e004408dd 100644 (file)
@@ -435,7 +435,7 @@ static int pkt_debugfs_fops_open(struct inode *inode, struct file *file)
        return single_open(file, pkt_debugfs_seq_show, inode->i_private);
 }
 
-static struct file_operations debug_fops = {
+static const struct file_operations debug_fops = {
        .open           = pkt_debugfs_fops_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
@@ -765,7 +765,7 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command *
                        goto out;
        }
 
-       rq->cmd_len = COMMAND_SIZE(rq->cmd[0]);
+       rq->cmd_len = COMMAND_SIZE(cgc->cmd[0]);
        memcpy(rq->cmd, cgc->cmd, CDROM_PACKET_SIZE);
        if (sizeof(rq->cmd) > CDROM_PACKET_SIZE)
                memset(rq->cmd + CDROM_PACKET_SIZE, 0, sizeof(rq->cmd) - CDROM_PACKET_SIZE);
@@ -2725,7 +2725,7 @@ static int pkt_seq_open(struct inode *inode, struct file *file)
        return single_open(file, pkt_seq_show, PDE(inode)->data);
 }
 
-static struct file_operations pkt_proc_fops = {
+static const struct file_operations pkt_proc_fops = {
        .open   = pkt_seq_open,
        .read   = seq_read,
        .llseek = seq_lseek,
@@ -3052,7 +3052,7 @@ static int pkt_ctl_ioctl(struct inode *inode, struct file *file, unsigned int cm
 }
 
 
-static struct file_operations pkt_ctl_fops = {
+static const struct file_operations pkt_ctl_fops = {
        .ioctl   = pkt_ctl_ioctl,
        .owner   = THIS_MODULE,
 };