aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/libata-scsi.c11
-rw-r--r--include/linux/ata.h4
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 7e959f90c020..e417e1a1d02c 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -675,19 +675,18 @@ static int ata_ioc32(struct ata_port *ap)
675int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev, 675int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev,
676 int cmd, void __user *arg) 676 int cmd, void __user *arg)
677{ 677{
678 int val = -EINVAL, rc = -EINVAL; 678 unsigned long val;
679 int rc = -EINVAL;
679 unsigned long flags; 680 unsigned long flags;
680 681
681 switch (cmd) { 682 switch (cmd) {
682 case ATA_IOC_GET_IO32: 683 case HDIO_GET_32BIT:
683 spin_lock_irqsave(ap->lock, flags); 684 spin_lock_irqsave(ap->lock, flags);
684 val = ata_ioc32(ap); 685 val = ata_ioc32(ap);
685 spin_unlock_irqrestore(ap->lock, flags); 686 spin_unlock_irqrestore(ap->lock, flags);
686 if (copy_to_user(arg, &val, 1)) 687 return put_user(val, (unsigned long __user *)arg);
687 return -EFAULT;
688 return 0;
689 688
690 case ATA_IOC_SET_IO32: 689 case HDIO_SET_32BIT:
691 val = (unsigned long) arg; 690 val = (unsigned long) arg;
692 rc = 0; 691 rc = 0;
693 spin_lock_irqsave(ap->lock, flags); 692 spin_lock_irqsave(ap->lock, flags);
diff --git a/include/linux/ata.h b/include/linux/ata.h
index d2992bfa1706..c1a2f345cbe6 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -487,8 +487,8 @@ enum ata_tf_protocols {
487}; 487};
488 488
489enum ata_ioctls { 489enum ata_ioctls {
490 ATA_IOC_GET_IO32 = 0x309, 490 ATA_IOC_GET_IO32 = 0x309, /* HDIO_GET_32BIT */
491 ATA_IOC_SET_IO32 = 0x324, 491 ATA_IOC_SET_IO32 = 0x324, /* HDIO_SET_32BIT */
492}; 492};
493 493
494/* core structures */ 494/* core structures */