diff options
author | John Stultz <john.stultz@linaro.org> | 2013-01-11 01:20:31 +0000 |
---|---|---|
committer | Serban Constantinescu <serban.constantinescu@arm.com> | 2013-02-04 11:21:18 +0000 |
commit | 3a9990b2e2c97134027cd2af4b82b5a76e2adc20 (patch) | |
tree | acd70d735750aa0fd44964ce8d59a07da56aa3e6 /drivers/staging/android/android_alarm.h | |
parent | 48c41779f86ed1066ebf33f86d4e412fafbd48b8 (diff) |
staging: alarm-dev: Implement compat_ioctl supporttracking-armdroid-binder-ll-20130205.0
Implement compat_ioctl support for the alarm-dev ioctl.
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Serban Constantinescu <serban.constantinescu@arm.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Colin Cross <ccross@google.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'drivers/staging/android/android_alarm.h')
-rw-r--r-- | drivers/staging/android/android_alarm.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/staging/android/android_alarm.h b/drivers/staging/android/android_alarm.h index d0cafd637199..4fd32f337f9c 100644 --- a/drivers/staging/android/android_alarm.h +++ b/drivers/staging/android/android_alarm.h @@ -18,6 +18,7 @@ #include <linux/ioctl.h> #include <linux/time.h> +#include <linux/compat.h> enum android_alarm_type { /* return code bit numbers or set alarm arg */ @@ -59,4 +60,22 @@ enum android_alarm_return_flags { #define ANDROID_ALARM_BASE_CMD(cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0))) #define ANDROID_ALARM_IOCTL_TO_TYPE(cmd) (_IOC_NR(cmd) >> 4) + +#ifdef CONFIG_COMPAT +#define ANDROID_ALARM_SET_COMPAT(type) ALARM_IOW(2, type, \ + struct compat_timespec) +#define ANDROID_ALARM_SET_AND_WAIT_COMPAT(type) ALARM_IOW(3, type, \ + struct compat_timespec) +#define ANDROID_ALARM_GET_TIME_COMPAT(type) ALARM_IOW(4, type, \ + struct compat_timespec) +#define ANDROID_ALARM_SET_RTC_COMPAT _IOW('a', 5, \ + struct compat_timespec) +#define ANDROID_ALARM_IOCTL_NR(cmd) (_IOC_NR(cmd) & ((1<<4)-1)) +#define ANDROID_ALARM_COMPAT_TO_NORM(cmd) \ + ALARM_IOW(ANDROID_ALARM_IOCTL_NR(cmd), \ + ANDROID_ALARM_IOCTL_TO_TYPE(cmd), \ + struct timespec) + +#endif + #endif |