projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d0db6b
)
Staging: android: fix build error on 64bit boxes
author
Greg Kroah-Hartman
<
[email protected]
>
Wed, 28 Jan 2009 23:42:43 +0000
(15:42 -0800)
committer
Greg Kroah-Hartman
<
[email protected]
>
Wed, 28 Jan 2009 23:49:05 +0000
(15:49 -0800)
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 <
[email protected]
>
Cc: Arve Hjønnevåg <
[email protected]
>
Cc: Mike Lockwood <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/android/timed_gpio.c
patch
|
blob
|
history
diff --git
a/drivers/staging/android/timed_gpio.c
b/drivers/staging/android/timed_gpio.c
index b41b20e34628e69b2f4731a94c0c846e1be179bb..903270cbbe0201d28df7cfe1ba0038249c494b21 100644
(file)
--- 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
if (hrtimer_active(&gpio_data->timer)) {
ktime_t r = hrtimer_get_remaining(&gpio_data->timer);
- remaining = r.tv.sec * 1000 + r.tv.nsec / 1000000;
+ struct timeval t = ktime_to_timeval(r);
+ remaining = t.tv_sec * 1000 + t.tv_usec;
} else
remaining = 0;