Commit 9adb9254 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Torvalds

ide: hpt366: convert to use match_string() helper

The new helper returns index of the mathing string in an array.  We
would use it here.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 908913bd
...@@ -531,14 +531,9 @@ static const struct hpt_info hpt371n = { ...@@ -531,14 +531,9 @@ static const struct hpt_info hpt371n = {
.timings = &hpt37x_timings .timings = &hpt37x_timings
}; };
static int check_in_drive_list(ide_drive_t *drive, const char **list) static bool check_in_drive_list(ide_drive_t *drive, const char **list)
{ {
char *m = (char *)&drive->id[ATA_ID_PROD]; return match_string(list, -1, (char *)&drive->id[ATA_ID_PROD]) >= 0;
while (*list)
if (!strcmp(*list++, m))
return 1;
return 0;
} }
static struct hpt_info *hpt3xx_get_info(struct device *dev) static struct hpt_info *hpt3xx_get_info(struct device *dev)
......
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