aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-01-28 18:42:43 -0500
committerGreg Kroah-Hartman <gregkh@kvm.kroah.org>2009-01-28 18:49:05 -0500
commit07960058f0ce77ddc3027d3e45a5de1fb977334f (patch)
tree96432748b69401b02975c85f85ffb4333a892fb6 /drivers
parent2d0db6bf5010c26beb1ccbd4ee50991fd2c05d90 (diff)
Staging: android: fix build error on 64bit boxes
ktime_t isn't ment to directly access on all arches, so use the proper conversion functions instead to figure out what time is remaining. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: Mike Lockwood <lockwood@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/android/timed_gpio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c
index b41b20e34628..903270cbbe02 100644
--- a/drivers/staging/android/timed_gpio.c
+++ b/drivers/staging/android/timed_gpio.c
@@ -49,7 +49,8 @@ static ssize_t gpio_enable_show(struct device *dev, struct device_attribute *att
49 49
50 if (hrtimer_active(&gpio_data->timer)) { 50 if (hrtimer_active(&gpio_data->timer)) {
51 ktime_t r = hrtimer_get_remaining(&gpio_data->timer); 51 ktime_t r = hrtimer_get_remaining(&gpio_data->timer);
52 remaining = r.tv.sec * 1000 + r.tv.nsec / 1000000; 52 struct timeval t = ktime_to_timeval(r);
53 remaining = t.tv_sec * 1000 + t.tv_usec;
53 } else 54 } else
54 remaining = 0; 55 remaining = 0;
55 56