aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/hpt366.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:19 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:19 -0400
commit4dde4492d850a4c9bcaa92e5bd7f4eebe3e2f5ab (patch)
treeee3be70390e4c617b44329edef0a05039f59c81a /drivers/ide/pci/hpt366.c
parent5b90e990928919ae411a68b865e8a6ecac09a603 (diff)
ide: make drive->id an union (take 2)
Make drive->id an unnamed union so id can be accessed either by using 'u16 *id' or 'struct hd_driveid *driveid'. Then convert all existing drive->id users accordingly (using 'u16 *id' when possible). This is an intermediate step to make ide 'struct hd_driveid'-free. While at it: - Add missing KERN_CONTs in it821x.c. - Use ATA_ID_WORDS and ATA_ID_*_LEN defines. - Remove unnecessary checks for drive->id. - s/drive_table/table/ in ide_in_drive_list(). - Cleanup ide_config_drive_speed() a bit. - s/drive1/dev1/ & s/drive0/dev0/ in ide_undecoded_slave(). v2: Fix typo in drivers/ide/ppc/pmac.c. (From Stephen Rothwell) There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/hpt366.c')
-rw-r--r--drivers/ide/pci/hpt366.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index c37ab1743819..b7f77fd3cb6e 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -605,10 +605,10 @@ static const struct hpt_info hpt371n __devinitdata = {
605 605
606static int check_in_drive_list(ide_drive_t *drive, const char **list) 606static int check_in_drive_list(ide_drive_t *drive, const char **list)
607{ 607{
608 struct hd_driveid *id = drive->id; 608 char *m = (char *)&drive->id[ATA_ID_PROD];
609 609
610 while (*list) 610 while (*list)
611 if (!strcmp(*list++,id->model)) 611 if (!strcmp(*list++, m))
612 return 1; 612 return 1;
613 return 0; 613 return 0;
614} 614}
@@ -731,11 +731,11 @@ static void hpt3xx_set_pio_mode(ide_drive_t *drive, const u8 pio)
731 731
732static void hpt3xx_quirkproc(ide_drive_t *drive) 732static void hpt3xx_quirkproc(ide_drive_t *drive)
733{ 733{
734 struct hd_driveid *id = drive->id; 734 char *m = (char *)&drive->id[ATA_ID_PROD];
735 const char **list = quirk_drives; 735 const char **list = quirk_drives;
736 736
737 while (*list) 737 while (*list)
738 if (strstr(id->model, *list++)) { 738 if (strstr(m, *list++)) {
739 drive->quirk_list = 1; 739 drive->quirk_list = 1;
740 return; 740 return;
741 } 741 }