From a0cf733b333eeeafb7324e2897448006c693c26c Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 2 Jan 2007 20:18:49 +0900 Subject: libata: straighten out ATA_ID_* constants * Kill _OFS suffixes in ATA_ID_{SERNO|FW_REV|PROD}_OFS for consistency with other ATA_ID_* constants. * Kill ATA_SERNO_LEN * Add and use ATA_ID_SERNO_LEN, ATA_ID_FW_REV_LEN and ATA_ID_PROD_LEN. This change also makes ata_device_blacklisted() use proper length for fwrev. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/pata_hpt37x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/ata/pata_hpt37x.c') diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index 3ad0e51cb2ab..ff767755e98b 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c @@ -349,13 +349,12 @@ static u32 hpt37x_find_mode(struct ata_port *ap, int speed) static int hpt_dma_blacklisted(const struct ata_device *dev, char *modestr, const char *list[]) { - unsigned char model_num[40]; + unsigned char model_num[ATA_ID_PROD_LEN]; char *s; unsigned int len; int i = 0; - ata_id_string(dev->id, model_num, ATA_ID_PROD_OFS, - sizeof(model_num)); + ata_id_string(dev->id, model_num, ATA_ID_PROD, sizeof(model_num)); s = &model_num[0]; len = strnlen(s, sizeof(model_num)); -- cgit v1.2.2