Skip to content

Commit

Permalink
ide: hpt366: convert to use match_string() helper
Browse files Browse the repository at this point in the history
The new helper returns index of the mathing string in an array.  We
would use it here.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andy Shevchenko authored and Linus Torvalds committed Mar 17, 2016
1 parent 908913b commit 9adb925
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/ide/hpt366.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,14 +531,9 @@ static const struct hpt_info hpt371n = {
.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];

while (*list)
if (!strcmp(*list++, m))
return 1;
return 0;
return match_string(list, -1, (char *)&drive->id[ATA_ID_PROD]) >= 0;
}

static struct hpt_info *hpt3xx_get_info(struct device *dev)
Expand Down

0 comments on commit 9adb925

Please sign in to comment.