Signed-off-by: Guenter Roeck <linux@roeck-us.net>
--- /dev/null
+/*---------------------------------------------------------------------------
+ *
+ * compat.h
+ * Copyright (c) 2012 Guenter Roeck <linux@roeck-us.net>
+ *
+ *---------------------------------------------------------------------------
+ */
+
+#ifndef COMPAT_H
+#define COMPAT_H
+
+#ifndef kstrtol
+#define kstrtol strict_strtol
+#endif
+#ifndef kstrtoul
+#define kstrtoul strict_strtoul
+#endif
+
+#ifndef request_muxed_region
+#define request_muxed_region(a, b, c) (true)
+#define release_region(a, b)
+#endif
+
+#endif /* COMPAT_H */
#include <linux/acpi.h>
#include <linux/io.h>
-#ifndef kstrtol
-#define kstrtol strict_strtol
-#endif
-#ifndef kstrtoul
-#define kstrtoul strict_strtoul
-#endif
+#include "compat.h"
#define DRVNAME "it87"
/*
* Try to reserve REG and REG + 1 for exclusive access.
*/
-#ifdef request_muxed_region
if (!request_muxed_region(REG, 2, DRVNAME))
return -EBUSY;
-#endif
outb(0x87, REG);
outb(0x01, REG);
{
outb(0x02, REG);
outb(0x02, VAL);
-#ifdef request_muxed_region
release_region(REG, 2);
-#endif
}
/* Logical device 4 registers */