[PATCH] ata: disk_ata_drive: remove obsolete check for ID validity

Peter Mamonov pmamonov at gmail.com
Fri Oct 30 03:00:45 PDT 2015


Acked-by: Juergen Borleis <jbe at pengutronix.de>
Signed-off-by: Peter Mamonov <pmamonov at gmail.com>
---
 drivers/ata/disk_ata_drive.c | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/drivers/ata/disk_ata_drive.c b/drivers/ata/disk_ata_drive.c
index ee1709e..d30d0ad 100644
--- a/drivers/ata/disk_ata_drive.c
+++ b/drivers/ata/disk_ata_drive.c
@@ -26,16 +26,6 @@
 #include <disks.h>
 #include <dma.h>
 
-static int ata_id_is_valid(const uint16_t *id)
-{
-	if ((id[ATA_ID_FIELD_VALID] & 1) == 0) {
-		pr_debug("Drive's ID seems invalid\n");
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
 static uint64_t ata_id_n_sectors(uint16_t *id)
 {
 	if (ata_id_has_lba(id)) {
@@ -244,13 +234,6 @@ static int ata_port_init(struct ata_port *port)
 
 	ata_fix_endianess(port->id, SECTOR_SIZE / sizeof(uint16_t));
 
-	rc = ata_id_is_valid(port->id);
-	if (rc) {
-		dev_err(dev, "ata id invalid\n");
-		free(port->id);
-		return rc;
-	}
-
 #ifdef DEBUG
 	ata_dump_id(port->id);
 #endif
-- 
2.1.4




More information about the barebox mailing list