]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/staging/android/timed_gpio.c
[ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0
[linux-2.6-omap-h63xx.git] / drivers / staging / android / timed_gpio.c
index bea68c9fc942ec4f63281f19bc72081671ab79da..903270cbbe0201d28df7cfe1ba0038249c494b21 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/platform_device.h>
 #include <linux/hrtimer.h>
 #include <linux/err.h>
-#include <asm/arch/gpio.h>
+#include <linux/gpio.h>
 
 #include "timed_gpio.h"
 
@@ -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;