Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 350753 | Differences between
and this patch

Collapse All | Expand All

(-)vhba.c.old (-3 / +7 lines)
Lines 672-683 Link Here
672
        return ret;
672
        return ret;
673
}
673
}
674
674
675
static int vhba_ctl_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
675
static long vhba_ctl_ioctl (struct file *file, unsigned int cmd, unsigned long arg)
676
{
676
{
677
        struct vhba_device *vdev = file->private_data;
677
        struct vhba_device *vdev = file->private_data;
678
        struct vhba_host *vhost;
678
        struct vhba_host *vhost;
679
        struct scsi_device *sdev;
679
        struct scsi_device *sdev;
680
680
681
        lock_kernel();
681
        switch (cmd) {
682
        switch (cmd) {
682
        case 0xBEEF001:
683
        case 0xBEEF001:
683
                vhost = platform_get_drvdata(&vhba_platform_device);
684
                vhost = platform_get_drvdata(&vhba_platform_device);
Lines 694-706 Link Here
694
                        scsi_device_put(sdev);
695
                        scsi_device_put(sdev);
695
696
696
                        if (copy_to_user((void *)arg, id, sizeof(id)))
697
                        if (copy_to_user((void *)arg, id, sizeof(id)))
697
                                return -EFAULT;
698
                                { unlock_kernel(); return -EFAULT; }
698
        
699
        
700
                        unlock_kernel();
699
                        return 0;
701
                        return 0;
700
                } else {
702
                } else {
703
                        unlock_kernel();
701
                        return -ENODEV;
704
                        return -ENODEV;
702
                }
705
                }
703
        }
706
        }
707
        unlock_kernel();
704
    
708
    
705
        return -ENOTTY;
709
        return -ENOTTY;
706
}
710
}
Lines 782-788 Link Here
782
        .read = vhba_ctl_read,
786
        .read = vhba_ctl_read,
783
        .write = vhba_ctl_write,
787
        .write = vhba_ctl_write,
784
        .poll = vhba_ctl_poll,
788
        .poll = vhba_ctl_poll,
785
        .ioctl = vhba_ctl_ioctl,
789
        .unlocked_ioctl = vhba_ctl_ioctl,
786
};
790
};
787
791
788
static struct miscdevice vhba_miscdev = {
792
static struct miscdevice vhba_miscdev = {

Return to bug 350753