diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:19 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:19 -0400 |
commit | 4dde4492d850a4c9bcaa92e5bd7f4eebe3e2f5ab (patch) | |
tree | ee3be70390e4c617b44329edef0a05039f59c81a /drivers/ide/ide-tape.c | |
parent | 5b90e990928919ae411a68b865e8a6ecac09a603 (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/ide-tape.c')
-rw-r--r-- | drivers/ide/ide-tape.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index a373cc4142b7..2c4c6674db61 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -2311,7 +2311,7 @@ static int idetape_identify_device(ide_drive_t *drive) | |||
2311 | if (drive->id_read == 0) | 2311 | if (drive->id_read == 0) |
2312 | return 1; | 2312 | return 1; |
2313 | 2313 | ||
2314 | *((unsigned short *) &gcw) = drive->id->config; | 2314 | *((u16 *)&gcw) = drive->id[ATA_ID_CONFIG]; |
2315 | 2315 | ||
2316 | protocol = (gcw[1] & 0xC0) >> 6; | 2316 | protocol = (gcw[1] & 0xC0) >> 6; |
2317 | device_type = gcw[1] & 0x1F; | 2317 | device_type = gcw[1] & 0x1F; |
@@ -2463,7 +2463,7 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor) | |||
2463 | drive->dsc_overlap = 0; | 2463 | drive->dsc_overlap = 0; |
2464 | } | 2464 | } |
2465 | /* Seagate Travan drives do not support DSC overlap. */ | 2465 | /* Seagate Travan drives do not support DSC overlap. */ |
2466 | if (strstr(drive->id->model, "Seagate STT3401")) | 2466 | if (strstr((char *)&drive->id[ATA_ID_PROD], "Seagate STT3401")) |
2467 | drive->dsc_overlap = 0; | 2467 | drive->dsc_overlap = 0; |
2468 | tape->minor = minor; | 2468 | tape->minor = minor; |
2469 | tape->name[0] = 'h'; | 2469 | tape->name[0] = 'h'; |
@@ -2471,7 +2471,8 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor) | |||
2471 | tape->name[2] = '0' + minor; | 2471 | tape->name[2] = '0' + minor; |
2472 | tape->chrdev_dir = IDETAPE_DIR_NONE; | 2472 | tape->chrdev_dir = IDETAPE_DIR_NONE; |
2473 | tape->pc = tape->pc_stack; | 2473 | tape->pc = tape->pc_stack; |
2474 | *((unsigned short *) &gcw) = drive->id->config; | 2474 | |
2475 | *((u16 *)&gcw) = drive->id[ATA_ID_CONFIG]; | ||
2475 | 2476 | ||
2476 | /* Command packet DRQ type */ | 2477 | /* Command packet DRQ type */ |
2477 | if (((gcw[0] & 0x60) >> 5) == 1) | 2478 | if (((gcw[0] & 0x60) >> 5) == 1) |