projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clk: rockchip: rk3228: add CLK_IGNORE_UNUSED flag for vio_h2p
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
ata
/
libata-scsi.c
diff --git
a/drivers/ata/libata-scsi.c
b/drivers/ata/libata-scsi.c
index 7e959f90c0203f9b94124ab73867e4a72bd11188..e417e1a1d02c568595fa465682ade483a9d0645a 100644
(file)
--- a/
drivers/ata/libata-scsi.c
+++ b/
drivers/ata/libata-scsi.c
@@
-675,19
+675,18
@@
static int ata_ioc32(struct ata_port *ap)
int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev,
int cmd, void __user *arg)
{
int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev,
int cmd, void __user *arg)
{
- int val = -EINVAL, rc = -EINVAL;
+ unsigned long val;
+ int rc = -EINVAL;
unsigned long flags;
switch (cmd) {
unsigned long flags;
switch (cmd) {
- case
ATA_IOC_GET_IO32
:
+ case
HDIO_GET_32BIT
:
spin_lock_irqsave(ap->lock, flags);
val = ata_ioc32(ap);
spin_unlock_irqrestore(ap->lock, flags);
spin_lock_irqsave(ap->lock, flags);
val = ata_ioc32(ap);
spin_unlock_irqrestore(ap->lock, flags);
- if (copy_to_user(arg, &val, 1))
- return -EFAULT;
- return 0;
+ return put_user(val, (unsigned long __user *)arg);
- case
ATA_IOC_SET_IO32
:
+ case
HDIO_SET_32BIT
:
val = (unsigned long) arg;
rc = 0;
spin_lock_irqsave(ap->lock, flags);
val = (unsigned long) arg;
rc = 0;
spin_lock_irqsave(ap->lock, flags);