diff options
author | Tejun Heo <htejun@gmail.com> | 2006-02-12 22:47:04 +0900 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-12 14:24:41 -0500 |
commit | 3d2ca91095f8ab6dc0cb925374eec62fa5336764 (patch) | |
tree | 4320fb9649dfbd389ea07d299288732b767534d7 /drivers/scsi/libata-core.c | |
parent | 2940740bcaa5948967d261dfceec04f40b2d2fa1 (diff) | |
download | op-kernel-dev-3d2ca91095f8ab6dc0cb925374eec62fa5336764.zip op-kernel-dev-3d2ca91095f8ab6dc0cb925374eec62fa5336764.tar.gz |
[PATCH] libata: separate out ata_id_major_version()
Separate out ATA major version calculation from ata_dev_identify()
into ata_id_major_version(). It's preparation for splitting
ata_dev_identify().
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r-- | drivers/scsi/libata-core.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 4df5024..d87854e1 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -927,7 +927,6 @@ static void ata_dev_identify(struct ata_port *ap, unsigned int device) { struct ata_device *dev = &ap->device[device]; unsigned int major_version; - u16 tmp; unsigned long xfer_modes; unsigned int using_edd; struct ata_taskfile tf; @@ -1030,10 +1029,7 @@ retry: goto err_out_nosup; /* get major version */ - tmp = dev->id[ATA_ID_MAJOR_VER]; - for (major_version = 14; major_version >= 1; major_version--) - if (tmp & (1 << major_version)) - break; + major_version = ata_id_major_version(dev->id); /* * The exact sequence expected by certain pre-ATA4 drives is: |