Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: android: Split uapi out of android_alarm.h

Move the userspace interface of android_alarm.h to
drivers/staging/android/uapi/android_alarm.h

Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
[jstultz: minor commit msg tweak]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Colin Cross and committed by
Greg Kroah-Hartman
a6b09619 d9ad7a98

+64 -42
+2 -42
drivers/staging/android/android_alarm.h
··· 16 16 #ifndef _LINUX_ANDROID_ALARM_H 17 17 #define _LINUX_ANDROID_ALARM_H 18 18 19 - #include <linux/ioctl.h> 20 - #include <linux/time.h> 21 19 #include <linux/compat.h> 20 + #include <linux/ioctl.h> 22 21 23 - enum android_alarm_type { 24 - /* return code bit numbers or set alarm arg */ 25 - ANDROID_ALARM_RTC_WAKEUP, 26 - ANDROID_ALARM_RTC, 27 - ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP, 28 - ANDROID_ALARM_ELAPSED_REALTIME, 29 - ANDROID_ALARM_SYSTEMTIME, 30 - 31 - ANDROID_ALARM_TYPE_COUNT, 32 - 33 - /* return code bit numbers */ 34 - /* ANDROID_ALARM_TIME_CHANGE = 16 */ 35 - }; 36 - 37 - enum android_alarm_return_flags { 38 - ANDROID_ALARM_RTC_WAKEUP_MASK = 1U << ANDROID_ALARM_RTC_WAKEUP, 39 - ANDROID_ALARM_RTC_MASK = 1U << ANDROID_ALARM_RTC, 40 - ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK = 41 - 1U << ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP, 42 - ANDROID_ALARM_ELAPSED_REALTIME_MASK = 43 - 1U << ANDROID_ALARM_ELAPSED_REALTIME, 44 - ANDROID_ALARM_SYSTEMTIME_MASK = 1U << ANDROID_ALARM_SYSTEMTIME, 45 - ANDROID_ALARM_TIME_CHANGE_MASK = 1U << 16 46 - }; 47 - 48 - /* Disable alarm */ 49 - #define ANDROID_ALARM_CLEAR(type) _IO('a', 0 | ((type) << 4)) 50 - 51 - /* Ack last alarm and wait for next */ 52 - #define ANDROID_ALARM_WAIT _IO('a', 1) 53 - 54 - #define ALARM_IOW(c, type, size) _IOW('a', (c) | ((type) << 4), size) 55 - /* Set alarm */ 56 - #define ANDROID_ALARM_SET(type) ALARM_IOW(2, type, struct timespec) 57 - #define ANDROID_ALARM_SET_AND_WAIT(type) ALARM_IOW(3, type, struct timespec) 58 - #define ANDROID_ALARM_GET_TIME(type) ALARM_IOW(4, type, struct timespec) 59 - #define ANDROID_ALARM_SET_RTC _IOW('a', 5, struct timespec) 60 - #define ANDROID_ALARM_BASE_CMD(cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0))) 61 - #define ANDROID_ALARM_IOCTL_TO_TYPE(cmd) (_IOC_NR(cmd) >> 4) 62 - 22 + #include "uapi/android_alarm.h" 63 23 64 24 #ifdef CONFIG_COMPAT 65 25 #define ANDROID_ALARM_SET_COMPAT(type) ALARM_IOW(2, type, \
+62
drivers/staging/android/uapi/android_alarm.h
··· 1 + /* drivers/staging/android/uapi/android_alarm.h 2 + * 3 + * Copyright (C) 2006-2007 Google, Inc. 4 + * 5 + * This software is licensed under the terms of the GNU General Public 6 + * License version 2, as published by the Free Software Foundation, and 7 + * may be copied, distributed, and modified under those terms. 8 + * 9 + * This program is distributed in the hope that it will be useful, 10 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 + * GNU General Public License for more details. 13 + * 14 + */ 15 + 16 + #ifndef _UAPI_LINUX_ANDROID_ALARM_H 17 + #define _UAPI_LINUX_ANDROID_ALARM_H 18 + 19 + #include <linux/ioctl.h> 20 + #include <linux/time.h> 21 + 22 + enum android_alarm_type { 23 + /* return code bit numbers or set alarm arg */ 24 + ANDROID_ALARM_RTC_WAKEUP, 25 + ANDROID_ALARM_RTC, 26 + ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP, 27 + ANDROID_ALARM_ELAPSED_REALTIME, 28 + ANDROID_ALARM_SYSTEMTIME, 29 + 30 + ANDROID_ALARM_TYPE_COUNT, 31 + 32 + /* return code bit numbers */ 33 + /* ANDROID_ALARM_TIME_CHANGE = 16 */ 34 + }; 35 + 36 + enum android_alarm_return_flags { 37 + ANDROID_ALARM_RTC_WAKEUP_MASK = 1U << ANDROID_ALARM_RTC_WAKEUP, 38 + ANDROID_ALARM_RTC_MASK = 1U << ANDROID_ALARM_RTC, 39 + ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK = 40 + 1U << ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP, 41 + ANDROID_ALARM_ELAPSED_REALTIME_MASK = 42 + 1U << ANDROID_ALARM_ELAPSED_REALTIME, 43 + ANDROID_ALARM_SYSTEMTIME_MASK = 1U << ANDROID_ALARM_SYSTEMTIME, 44 + ANDROID_ALARM_TIME_CHANGE_MASK = 1U << 16 45 + }; 46 + 47 + /* Disable alarm */ 48 + #define ANDROID_ALARM_CLEAR(type) _IO('a', 0 | ((type) << 4)) 49 + 50 + /* Ack last alarm and wait for next */ 51 + #define ANDROID_ALARM_WAIT _IO('a', 1) 52 + 53 + #define ALARM_IOW(c, type, size) _IOW('a', (c) | ((type) << 4), size) 54 + /* Set alarm */ 55 + #define ANDROID_ALARM_SET(type) ALARM_IOW(2, type, struct timespec) 56 + #define ANDROID_ALARM_SET_AND_WAIT(type) ALARM_IOW(3, type, struct timespec) 57 + #define ANDROID_ALARM_GET_TIME(type) ALARM_IOW(4, type, struct timespec) 58 + #define ANDROID_ALARM_SET_RTC _IOW('a', 5, struct timespec) 59 + #define ANDROID_ALARM_BASE_CMD(cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0))) 60 + #define ANDROID_ALARM_IOCTL_TO_TYPE(cmd) (_IOC_NR(cmd) >> 4) 61 + 62 + #endif