Skip to content

Commit

Permalink
Staging: android: fix build error on 64bit boxes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Kroah-Hartman authored and Greg Kroah-Hartman committed Jan 28, 2009
1 parent 2d0db6b commit 0796005
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/android/timed_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0796005

Please sign in to comment.