summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 22:39:31 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 22:39:31 +0200
commit93734a234447a3c091f76d76f7351af9d4dde518 (patch)
treee133b68a95c54a84fa637893800d6e62b64a48fb /drivers/ide/ide.c
parent718c72e83da295efc9c8625b6f380ef10352d955 (diff)
downloadlinux-93734a234447a3c091f76d76f7351af9d4dde518.tar.gz
linux-93734a234447a3c091f76d76f7351af9d4dde518.tar.bz2
linux-93734a234447a3c091f76d76f7351af9d4dde518.zip
ide: ide_id_to_hd_driveid() -> ata_id_to_hd_driveid()
Rename ide_id_to_hd_driveid() to ata_id_to_hd_driveid() and move it to <linux/ata.h>. Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c22
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)
return ret;
}
-static inline void ide_id_to_hd_driveid(u16 *id)
-{
-#ifdef __BIG_ENDIAN
- /* accessed in struct hd_driveid as 8-bit values */
- id[ATA_ID_MAX_MULTSECT] = __cpu_to_le16(id[ATA_ID_MAX_MULTSECT]);
- id[ATA_ID_CAPABILITY] = __cpu_to_le16(id[ATA_ID_CAPABILITY]);
- id[ATA_ID_OLD_PIO_MODES] = __cpu_to_le16(id[ATA_ID_OLD_PIO_MODES]);
- id[ATA_ID_OLD_DMA_MODES] = __cpu_to_le16(id[ATA_ID_OLD_DMA_MODES]);
- id[ATA_ID_MULTSECT] = __cpu_to_le16(id[ATA_ID_MULTSECT]);
-
- /* as 32-bit values */
- *(u32 *)&id[ATA_ID_LBA_CAPACITY] = ata_id_u32(id, ATA_ID_LBA_CAPACITY);
- *(u32 *)&id[ATA_ID_SPG] = ata_id_u32(id, ATA_ID_SPG);
-
- /* as 64-bit value */
- *(u64 *)&id[ATA_ID_LBA_CAPACITY_2] =
- ata_id_u64(id, ATA_ID_LBA_CAPACITY_2);
-#endif
-}
-
static int ide_get_identity_ioctl(ide_drive_t *drive, unsigned int cmd,
unsigned long arg)
{
@@ -548,7 +528,7 @@ static int ide_get_identity_ioctl(ide_drive_t *drive, unsigned int cmd,
}
memcpy(id, drive->id, size);
- ide_id_to_hd_driveid(id);
+ ata_id_to_hd_driveid(id);
if (copy_to_user((void __user *)arg, id, size))
rc = -EFAULT;