[PATCH] ide: fix revision comparison in ide_in_drive_list

From: Kirill Smelkov
Date: Tue Jun 20 2006 - 06:51:44 EST


NB: bart/ide-2.6.git seems to be unmaintained, so I'm sending this directly to -mm

Fix ide_in_drive_list: drive_table->id_firmware should be searched *in* id->fw_rev,
not vise versa.

Signed-off-by: Kirill Smelkov <kirr@xxxxxxxxxx>

Index: linux-2.6.17/drivers/ide/ide-dma.c
===================================================================
--- linux-2.6.17.orig/drivers/ide/ide-dma.c 2006-06-20 13:51:49.000000000 +0400
+++ linux-2.6.17/drivers/ide/ide-dma.c 2006-06-20 13:52:14.000000000 +0400
@@ -147,7 +147,7 @@
{
for ( ; drive_table->id_model ; drive_table++)
if ((!strcmp(drive_table->id_model, id->model)) &&
- ((strstr(drive_table->id_firmware, id->fw_rev)) ||
+ ((strstr(id->fw_rev, drive_table->id_firmware)) ||
(!strcmp(drive_table->id_firmware, "ALL"))))
return 1;
return 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/