[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1357947984-15611-2-git-send-email-john.stultz@linaro.org>
Date: Fri, 11 Jan 2013 15:46:22 -0800
From: John Stultz <john.stultz@...aro.org>
To: linux-kernel@...r.kernel.org
Cc: John Stultz <john.stultz@...aro.org>,
Greg KH <gregkh@...uxfoundation.org>,
Serban Constantinescu <serban.constantinescu@....com>,
Arve Hjønnevåg <arve@...roid.com>,
Colin Cross <ccross@...gle.com>,
Android Kernel Team <kernel-team@...roid.com>
Subject: [RFC][PATCH 1/3] staging: alarm-dev: Drop pre Android 1.0 _OLD ioctls
Per Colin's comment:
"The "support old userspace code" comment for those two ioctls has
been there since pre-Android 1.0. Those apis are not exposed to
Android apps, I don't see any problem deleting them."
Thus this patch removes the ANDROID_ALARM_SET_OLD and
ANDROID_ALARM_SET_AND_WAIT_OLD ioctl compatability
logic.
Cc: Greg KH <gregkh@...uxfoundation.org>
Cc: Serban Constantinescu <serban.constantinescu@....com>
Cc: Arve Hjønnevåg <arve@...roid.com>
Cc: Colin Cross <ccross@...gle.com>
Cc: Android Kernel Team <kernel-team@...roid.com>
Signed-off-by: John Stultz <john.stultz@...aro.org>
---
drivers/staging/android/alarm-dev.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/android/alarm-dev.c b/drivers/staging/android/alarm-dev.c
index a9b293f..d423850 100644
--- a/drivers/staging/android/alarm-dev.c
+++ b/drivers/staging/android/alarm-dev.c
@@ -42,10 +42,6 @@ do { \
ANDROID_ALARM_RTC_WAKEUP_MASK | \
ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK)
-/* support old userspace code */
-#define ANDROID_ALARM_SET_OLD _IOW('a', 2, time_t) /* set alarm */
-#define ANDROID_ALARM_SET_AND_WAIT_OLD _IOW('a', 3, time_t)
-
static int alarm_opened;
static DEFINE_SPINLOCK(alarm_slock);
static struct wakeup_source alarm_wake_lock;
@@ -142,15 +138,6 @@ static long alarm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
spin_unlock_irqrestore(&alarm_slock, flags);
break;
- case ANDROID_ALARM_SET_OLD:
- case ANDROID_ALARM_SET_AND_WAIT_OLD:
- if (get_user(new_alarm_time.tv_sec, (int __user *)arg)) {
- rv = -EFAULT;
- goto err1;
- }
- new_alarm_time.tv_nsec = 0;
- goto from_old_alarm_set;
-
case ANDROID_ALARM_SET_AND_WAIT(0):
case ANDROID_ALARM_SET(0):
if (copy_from_user(&new_alarm_time, (void __user *)arg,
@@ -158,7 +145,6 @@ static long alarm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
rv = -EFAULT;
goto err1;
}
-from_old_alarm_set:
spin_lock_irqsave(&alarm_slock, flags);
alarm_dbg(IO, "alarm %d set %ld.%09ld\n",
alarm_type,
@@ -167,8 +153,8 @@ from_old_alarm_set:
devalarm_start(&alarms[alarm_type],
timespec_to_ktime(new_alarm_time));
spin_unlock_irqrestore(&alarm_slock, flags);
- if (ANDROID_ALARM_BASE_CMD(cmd) != ANDROID_ALARM_SET_AND_WAIT(0)
- && cmd != ANDROID_ALARM_SET_AND_WAIT_OLD)
+ if (ANDROID_ALARM_BASE_CMD(cmd) !=
+ ANDROID_ALARM_SET_AND_WAIT(0))
break;
/* fall though */
case ANDROID_ALARM_WAIT:
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists