]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/ide/pci/pdc202xx_new.c
pdc202xx_new: remove check_in_drive_lists abomination
[mv-sheeva.git] / drivers / ide / pci / pdc202xx_new.c
index fc2a45bb965127c955b68e684fbce108e08d6e90..236a03144a2796c04e35e23ae137755e6a495abd 100644 (file)
@@ -92,26 +92,6 @@ static u8 pdcnew_ratemask(ide_drive_t *drive)
        return  mode;
 }
 
-static int check_in_drive_lists(ide_drive_t *drive, const char **list)
-{
-       struct hd_driveid *id = drive->id;
-
-       if (pdc_quirk_drives == list) {
-               while (*list) {
-                       if (strstr(id->model, *list++)) {
-                               return 2;
-                       }
-               }
-       } else {
-               while (*list) {
-                       if (!strcmp(*list++,id->model)) {
-                               return 1;
-                       }
-               }
-       }
-       return 0;
-}
-
 /**
  * get_indexed_reg - Get indexed register
  * @hwif: for the port address
@@ -324,7 +304,12 @@ fast_ata_pio:
 
 static int pdcnew_quirkproc(ide_drive_t *drive)
 {
-       return check_in_drive_lists(drive, pdc_quirk_drives);
+       const char **list, *model = drive->id->model;
+
+       for (list = pdc_quirk_drives; *list != NULL; list++)
+               if (strstr(model, *list) != NULL)
+                       return 2;
+       return 0;
 }
 
 static void pdcnew_reset(ide_drive_t *drive)