[PATCH] ide: fix revision comparison in ide_in_drive_list

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

Signed-off-by: Kirill Smelkov <[email protected]>
Cc: Bartlomiej Zolnierkiewicz <[email protected]>
Cc: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Kirill Smelkov 2006-10-03 01:14:18 -07:00 • committed by Linus Torvalds
commit 14e0a19320

View file

@ -145,7 +145,7 @@ int ide_in_drive_list(struct hd_driveid *id, const struct drive_list_entry *driv
{
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;