]>
Commit | Line | Data |
---|---|---|
1df8150e GKH |
1 | From d38e0e3fed4f58bcddef4dc93a591dfe2f651cb0 Mon Sep 17 00:00:00 2001 |
2 | From: Colin Cross <ccross@android.com> | |
3 | Date: Wed, 7 Nov 2012 18:21:51 -0800 | |
4 | Subject: Revert "Staging: Android alarm: IOCTL command encoding fix" | |
5 | ||
6 | From: Colin Cross <ccross@android.com> | |
7 | ||
8 | commit d38e0e3fed4f58bcddef4dc93a591dfe2f651cb0 upstream. | |
9 | ||
10 | Commit 6bd4a5d96c08dc2380f8053b1bd4f879f55cd3c9 changed the | |
11 | ANDROID_ALARM_GET_TIME ioctls from IOW to IOR. While technically | |
12 | correct, the _IOC_DIR bits are ignored by alarm_ioctl, so the | |
13 | commit breaks a userspace ABI used by all existing Android devices | |
14 | for a purely cosmetic reason. Revert it. | |
15 | ||
16 | Cc: Dae S. Kim <dae@velatum.com> | |
17 | Signed-off-by: Colin Cross <ccross@android.com> | |
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
19 | ||
20 | --- | |
21 | drivers/staging/android/android_alarm.h | 4 +--- | |
22 | 1 file changed, 1 insertion(+), 3 deletions(-) | |
23 | ||
24 | --- a/drivers/staging/android/android_alarm.h | |
25 | +++ b/drivers/staging/android/android_alarm.h | |
26 | @@ -51,12 +51,10 @@ enum android_alarm_return_flags { | |
27 | #define ANDROID_ALARM_WAIT _IO('a', 1) | |
28 | ||
29 | #define ALARM_IOW(c, type, size) _IOW('a', (c) | ((type) << 4), size) | |
30 | -#define ALARM_IOR(c, type, size) _IOR('a', (c) | ((type) << 4), size) | |
31 | - | |
32 | /* Set alarm */ | |
33 | #define ANDROID_ALARM_SET(type) ALARM_IOW(2, type, struct timespec) | |
34 | #define ANDROID_ALARM_SET_AND_WAIT(type) ALARM_IOW(3, type, struct timespec) | |
35 | -#define ANDROID_ALARM_GET_TIME(type) ALARM_IOR(4, type, struct timespec) | |
36 | +#define ANDROID_ALARM_GET_TIME(type) ALARM_IOW(4, type, struct timespec) | |
37 | #define ANDROID_ALARM_SET_RTC _IOW('a', 5, struct timespec) | |
38 | #define ANDROID_ALARM_BASE_CMD(cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0))) | |
39 | #define ANDROID_ALARM_IOCTL_TO_TYPE(cmd) (_IOC_NR(cmd) >> 4) |