mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[PATCH] switch sg_scsi_ioctl() to passing fmode_t
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
5842e51ff2
commit
e915e872ed
4 changed files with 8 additions and 13 deletions
|
|
@ -237,7 +237,7 @@ int scsi_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
|
|||
case SCSI_IOCTL_SEND_COMMAND:
|
||||
if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
|
||||
return -EACCES;
|
||||
return sg_scsi_ioctl(NULL, sdev->request_queue, NULL, arg);
|
||||
return sg_scsi_ioctl(sdev->request_queue, NULL, 0, arg);
|
||||
case SCSI_IOCTL_DOORLOCK:
|
||||
return scsi_set_medium_removal(sdev, SCSI_REMOVAL_PREVENT);
|
||||
case SCSI_IOCTL_DOORUNLOCK:
|
||||
|
|
|
|||
|
|
@ -1059,7 +1059,7 @@ sg_ioctl(struct inode *inode, struct file *filp,
|
|||
if (sg_allow_access(filp, &opcode))
|
||||
return -EPERM;
|
||||
}
|
||||
return sg_scsi_ioctl(filp, sdp->device->request_queue, NULL, p);
|
||||
return sg_scsi_ioctl(sdp->device->request_queue, NULL, filp->f_mode, p);
|
||||
case SG_SET_DEBUG:
|
||||
result = get_user(val, ip);
|
||||
if (result)
|
||||
|
|
|
|||
Loading…
Reference in a new issue