Commit 14e0a193 authored by Kirill Smelkov's avatar Kirill Smelkov Committed by Linus Torvalds

[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: default avatarKirill Smelkov <kirr@mns.spb.ru>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f3d5b34c
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment