X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fide%2Fqd65xx.h;h=1fba2a5f281cddd06178bf701f3c0a351a714431;hb=63e7cf910542383591318941cb62a246ac191cfe;hp=6636f9665d169e8cf3c9beabe4b0e8867314138a;hpb=9892ec5497af1ec38c46974b5a370ba11c636b19;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/ide/qd65xx.h b/drivers/ide/qd65xx.h index 6636f96..1fba2a5 100644 --- a/drivers/ide/qd65xx.h +++ b/drivers/ide/qd65xx.h @@ -4,7 +4,7 @@ /* * Authors: Petr Soucek - * Samuel Thibault + * Samuel Thibault */ /* truncates a in [b,c] */ @@ -31,8 +31,15 @@ #define QD_CONFIG(hwif) ((hwif)->config_data & 0x00ff) -#define QD_TIMING(drive) (u8)(((drive)->drive_data) & 0x00ff) -#define QD_TIMREG(drive) (u8)((((drive)->drive_data) & 0xff00) >> 8) +static inline u8 QD_TIMING(ide_drive_t *drive) +{ + return (unsigned long)ide_get_drivedata(drive) & 0x00ff; +} + +static inline u8 QD_TIMREG(ide_drive_t *drive) +{ + return ((unsigned long)ide_get_drivedata(drive) & 0xff00) >> 8; +} #define QD6500_DEF_DATA ((QD_TIM1_PORT<<8) | (QD_ID3 ? 0x0c : 0x08)) #define QD6580_DEF_DATA ((QD_TIM1_PORT<<8) | (QD_ID3 ? 0x0a : 0x00))