From: Greg Kroah-Hartman Date: Wed, 28 Jan 2009 23:42:43 +0000 (-0800) Subject: Staging: android: fix build error on 64bit boxes X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=07960058f0ce77ddc3027d3e45a5de1fb977334f;p=linux-2.6-omap-h63xx.git 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 Cc: Arve Hjønnevåg Cc: Mike Lockwood Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c index b41b20e3462..903270cbbe0 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 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;