diff options
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 12618d2aed2c..f42de5fe9bc2 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -509,26 +509,6 @@ static int generic_drive_reset(ide_drive_t *drive) | |||
509 | return ret; | 509 | return ret; |
510 | } | 510 | } |
511 | 511 | ||
512 | static inline void ide_id_to_hd_driveid(u16 *id) | ||
513 | { | ||
514 | #ifdef __BIG_ENDIAN | ||
515 | /* accessed in struct hd_driveid as 8-bit values */ | ||
516 | id[ATA_ID_MAX_MULTSECT] = __cpu_to_le16(id[ATA_ID_MAX_MULTSECT]); | ||
517 | id[ATA_ID_CAPABILITY] = __cpu_to_le16(id[ATA_ID_CAPABILITY]); | ||
518 | id[ATA_ID_OLD_PIO_MODES] = __cpu_to_le16(id[ATA_ID_OLD_PIO_MODES]); | ||
519 | id[ATA_ID_OLD_DMA_MODES] = __cpu_to_le16(id[ATA_ID_OLD_DMA_MODES]); | ||
520 | id[ATA_ID_MULTSECT] = __cpu_to_le16(id[ATA_ID_MULTSECT]); | ||
521 | |||
522 | /* as 32-bit values */ | ||
523 | *(u32 *)&id[ATA_ID_LBA_CAPACITY] = ata_id_u32(id, ATA_ID_LBA_CAPACITY); | ||
524 | *(u32 *)&id[ATA_ID_SPG] = ata_id_u32(id, ATA_ID_SPG); | ||
525 | |||
526 | /* as 64-bit value */ | ||
527 | *(u64 *)&id[ATA_ID_LBA_CAPACITY_2] = | ||
528 | ata_id_u64(id, ATA_ID_LBA_CAPACITY_2); | ||
529 | #endif | ||
530 | } | ||
531 | |||
532 | static int ide_get_identity_ioctl(ide_drive_t *drive, unsigned int cmd, | 512 | static int ide_get_identity_ioctl(ide_drive_t *drive, unsigned int cmd, |
533 | unsigned long arg) | 513 | unsigned long arg) |
534 | { | 514 | { |
@@ -548,7 +528,7 @@ static int ide_get_identity_ioctl(ide_drive_t *drive, unsigned int cmd, | |||
548 | } | 528 | } |
549 | 529 | ||
550 | memcpy(id, drive->id, size); | 530 | memcpy(id, drive->id, size); |
551 | ide_id_to_hd_driveid(id); | 531 | ata_id_to_hd_driveid(id); |
552 | 532 | ||
553 | if (copy_to_user((void __user *)arg, id, size)) | 533 | if (copy_to_user((void __user *)arg, id, size)) |
554 | rc = -EFAULT; | 534 | rc = -EFAULT; |