aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2012-11-07 21:21:51 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-13 16:04:43 -0500
commitd38e0e3fed4f58bcddef4dc93a591dfe2f651cb0 (patch)
treeb0833aef61a5101b95fce7fc0a8d61d93bec9fd5 /drivers
parent77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff)
Revert "Staging: Android alarm: IOCTL command encoding fix"
Commit 6bd4a5d96c08dc2380f8053b1bd4f879f55cd3c9 changed the ANDROID_ALARM_GET_TIME ioctls from IOW to IOR. While technically correct, the _IOC_DIR bits are ignored by alarm_ioctl, so the commit breaks a userspace ABI used by all existing Android devices for a purely cosmetic reason. Revert it. Cc: stable <stable@vger.kernel.org> Cc: Dae S. Kim <dae@velatum.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/android/android_alarm.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/android/android_alarm.h b/drivers/staging/android/android_alarm.h
index f2ffd963f1c3..d0cafd637199 100644
--- a/drivers/staging/android/android_alarm.h
+++ b/drivers/staging/android/android_alarm.h
@@ -51,12 +51,10 @@ enum android_alarm_return_flags {
51#define ANDROID_ALARM_WAIT _IO('a', 1) 51#define ANDROID_ALARM_WAIT _IO('a', 1)
52 52
53#define ALARM_IOW(c, type, size) _IOW('a', (c) | ((type) << 4), size) 53#define ALARM_IOW(c, type, size) _IOW('a', (c) | ((type) << 4), size)
54#define ALARM_IOR(c, type, size) _IOR('a', (c) | ((type) << 4), size)
55
56/* Set alarm */ 54/* Set alarm */
57#define ANDROID_ALARM_SET(type) ALARM_IOW(2, type, struct timespec) 55#define ANDROID_ALARM_SET(type) ALARM_IOW(2, type, struct timespec)
58#define ANDROID_ALARM_SET_AND_WAIT(type) ALARM_IOW(3, type, struct timespec) 56#define ANDROID_ALARM_SET_AND_WAIT(type) ALARM_IOW(3, type, struct timespec)
59#define ANDROID_ALARM_GET_TIME(type) ALARM_IOR(4, type, struct timespec) 57#define ANDROID_ALARM_GET_TIME(type) ALARM_IOW(4, type, struct timespec)
60#define ANDROID_ALARM_SET_RTC _IOW('a', 5, struct timespec) 58#define ANDROID_ALARM_SET_RTC _IOW('a', 5, struct timespec)
61#define ANDROID_ALARM_BASE_CMD(cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0))) 59#define ANDROID_ALARM_BASE_CMD(cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0)))
62#define ANDROID_ALARM_IOCTL_TO_TYPE(cmd) (_IOC_NR(cmd) >> 4) 60#define ANDROID_ALARM_IOCTL_TO_TYPE(cmd) (_IOC_NR(cmd) >> 4)