summaryrefslogtreecommitdiffstats
path: root/drivers/ide/qd65xx.h
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-06-30 01:10:35 +0200
committerJames Morris <jmorris@namei.org>2009-06-30 01:10:35 +0200
commitac7242142b03421c96b0a2f8d99f146d075614c2 (patch)
treeb0b2ead65858c7a343d38affed86fe815e37e7e9 /drivers/ide/qd65xx.h
parentselinux: clean up avc node cache when disabling selinux (diff)
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiw... (diff)
downloadlinux-ac7242142b03421c96b0a2f8d99f146d075614c2.tar.xz
linux-ac7242142b03421c96b0a2f8d99f146d075614c2.zip
Merge branch 'master' into next
Diffstat (limited to 'drivers/ide/qd65xx.h')
-rw-r--r--drivers/ide/qd65xx.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/ide/qd65xx.h b/drivers/ide/qd65xx.h
index d7e67a1a1dcc..1fba2a5f281c 100644
--- a/drivers/ide/qd65xx.h
+++ b/drivers/ide/qd65xx.h
@@ -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))