diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-07-19 19:11:55 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-07-19 19:11:55 -0400 |
commit | 2229833c1365346b64357a9263fa724f74f5e376 (patch) | |
tree | 50f06ee86c940ef415561e548dabaaafd81a49a3 /include/linux/ide.h | |
parent | 342cdb6d4739cee430efc3eafcacd1605db66036 (diff) |
ide: add ide_dev_has_iordy() helper (take 4)
* Add ide_dev_has_iordy() helper and use it sl82c105 host driver.
* Remove no longer needed ide_pio_data_t.use_iordy field.
v2/v3:
* Fix issues noticed by Sergei:
- correct patch description
- fix comment in ide_get_best_pio_mode()
v4:
* Fix "ata_" prefix (Noticed by Jeff).
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index 83a117d673c7..349c22a1fbc5 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1363,6 +1363,11 @@ extern void ide_toggle_bounce(ide_drive_t *drive, int on); | |||
1363 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); | 1363 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); |
1364 | int ide_use_fast_pio(ide_drive_t *); | 1364 | int ide_use_fast_pio(ide_drive_t *); |
1365 | 1365 | ||
1366 | static inline int ide_dev_has_iordy(struct hd_driveid *id) | ||
1367 | { | ||
1368 | return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0; | ||
1369 | } | ||
1370 | |||
1366 | u8 ide_dump_status(ide_drive_t *, const char *, u8); | 1371 | u8 ide_dump_status(ide_drive_t *, const char *, u8); |
1367 | 1372 | ||
1368 | typedef struct ide_pio_timings_s { | 1373 | typedef struct ide_pio_timings_s { |
@@ -1374,7 +1379,6 @@ typedef struct ide_pio_timings_s { | |||
1374 | 1379 | ||
1375 | typedef struct ide_pio_data_s { | 1380 | typedef struct ide_pio_data_s { |
1376 | u8 pio_mode; | 1381 | u8 pio_mode; |
1377 | u8 use_iordy; | ||
1378 | unsigned int cycle_time; | 1382 | unsigned int cycle_time; |
1379 | } ide_pio_data_t; | 1383 | } ide_pio_data_t; |
1380 | 1384 | ||