diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2007-02-07 12:18:39 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-02-07 12:18:39 -0500 |
commit | d24ec426b3be3a011bc8568d53fea486b604a684 (patch) | |
tree | f51f209481e6e1738e7b7d4321ea844da1965bc3 /drivers/ide/pci/pdc202xx_old.c | |
parent | 272103144ac1ff937ed22917e1de05da4d6943dd (diff) |
pdc202xx_new: remove check_in_drive_lists abomination
Fold check_in_drive_lists() into quirkproc() handler in both PDC202xx
drivers-- this function was never called with a list other than
pdc_quirk_drives and was a bad example of code overall...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/pdc202xx_old.c')
-rw-r--r-- | drivers/ide/pci/pdc202xx_old.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index 143239c093d5..730e8d1ec2f5 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -123,26 +123,6 @@ static u8 pdc202xx_ratemask (ide_drive_t *drive) | |||
123 | return mode; | 123 | return mode; |
124 | } | 124 | } |
125 | 125 | ||
126 | static int check_in_drive_lists (ide_drive_t *drive, const char **list) | ||
127 | { | ||
128 | struct hd_driveid *id = drive->id; | ||
129 | |||
130 | if (pdc_quirk_drives == list) { | ||
131 | while (*list) { | ||
132 | if (strstr(id->model, *list++)) { | ||
133 | return 2; | ||
134 | } | ||
135 | } | ||
136 | } else { | ||
137 | while (*list) { | ||
138 | if (!strcmp(*list++,id->model)) { | ||
139 | return 1; | ||
140 | } | ||
141 | } | ||
142 | } | ||
143 | return 0; | ||
144 | } | ||
145 | |||
146 | static int pdc202xx_tune_chipset (ide_drive_t *drive, u8 xferspeed) | 126 | static int pdc202xx_tune_chipset (ide_drive_t *drive, u8 xferspeed) |
147 | { | 127 | { |
148 | ide_hwif_t *hwif = HWIF(drive); | 128 | ide_hwif_t *hwif = HWIF(drive); |
@@ -377,7 +357,12 @@ fast_ata_pio: | |||
377 | 357 | ||
378 | static int pdc202xx_quirkproc (ide_drive_t *drive) | 358 | static int pdc202xx_quirkproc (ide_drive_t *drive) |
379 | { | 359 | { |
380 | return ((int) check_in_drive_lists(drive, pdc_quirk_drives)); | 360 | const char **list, *model = drive->id->model; |
361 | |||
362 | for (list = pdc_quirk_drives; *list != NULL; list++) | ||
363 | if (strstr(model, *list) != NULL) | ||
364 | return 2; | ||
365 | return 0; | ||
381 | } | 366 | } |
382 | 367 | ||
383 | static void pdc202xx_old_ide_dma_start(ide_drive_t *drive) | 368 | static void pdc202xx_old_ide_dma_start(ide_drive_t *drive) |