* Re: [PATCH] Staging: Android: alarm-dev: Fixed a y2038 issue
2014-10-01 16:46 [PATCH] Staging: Android: alarm-dev: Fixed a y2038 issue Somya Anand
@ 2014-10-01 12:33 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2014-10-01 12:33 UTC (permalink / raw)
To: Somya Anand; +Cc: gregkh, devel, linux-kernel
On Wed, Oct 01, 2014 at 10:16:26PM +0530, Somya Anand wrote:
> Fixed y2038 issue by replacing timespec with timespec64.
>
This breaks the userspace API.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Staging: Android: alarm-dev: Fixed a y2038 issue
@ 2014-10-01 16:46 Somya Anand
2014-10-01 12:33 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Somya Anand @ 2014-10-01 16:46 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Somya Anand
Fixed y2038 issue by replacing timespec with timespec64.
Signed-off-by: Somya Anand <somyaanand214@gmail.com>
---
drivers/staging/android/alarm-dev.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/android/alarm-dev.c b/drivers/staging/android/alarm-dev.c
index ff4b3e8..ba8acf4 100644
--- a/drivers/staging/android/alarm-dev.c
+++ b/drivers/staging/android/alarm-dev.c
@@ -14,6 +14,7 @@
*/
#include <linux/time.h>
+#include <linux/ktime.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/miscdevice.h>
@@ -113,7 +114,7 @@ static void alarm_clear(enum android_alarm_type alarm_type)
}
static void alarm_set(enum android_alarm_type alarm_type,
- struct timespec *ts)
+ struct timespec64 *ts)
{
uint32_t alarm_type_mask = 1U << alarm_type;
unsigned long flags;
@@ -152,7 +153,7 @@ static int alarm_wait(void)
return rv;
}
-static int alarm_set_rtc(struct timespec *ts)
+static int alarm_set_rtc(struct timespec64 *ts)
{
struct rtc_time new_rtc_tm;
struct rtc_device *rtc_dev;
@@ -176,7 +177,7 @@ static int alarm_set_rtc(struct timespec *ts)
}
static int alarm_get_time(enum android_alarm_type alarm_type,
- struct timespec *ts)
+ struct timespec64 *ts)
{
int rv = 0;
@@ -199,7 +200,7 @@ static int alarm_get_time(enum android_alarm_type alarm_type,
}
static long alarm_do_ioctl(struct file *file, unsigned int cmd,
- struct timespec *ts)
+ struct timespec64 *ts)
{
int rv = 0;
unsigned long flags;
@@ -253,7 +254,7 @@ static long alarm_do_ioctl(struct file *file, unsigned int cmd,
static long alarm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
- struct timespec ts;
+ struct timespec64 ts;
int rv;
switch (ANDROID_ALARM_BASE_CMD(cmd)) {
@@ -284,7 +285,7 @@ static long alarm_compat_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
- struct timespec ts;
+ struct timespec64 ts;
int rv;
switch (ANDROID_ALARM_BASE_CMD(cmd)) {
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-01 12:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-01 16:46 [PATCH] Staging: Android: alarm-dev: Fixed a y2038 issue Somya Anand
2014-10-01 12:33 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox