All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 5/7] drivers: watchdog: sb_wdog: Fix 32bit linking problems
@ 2013-06-18 14:00 ` Markos Chandras
  0 siblings, 0 replies; 8+ messages in thread
From: Markos Chandras @ 2013-06-18 14:00 UTC (permalink / raw)
  To: linux-mips; +Cc: Markos Chandras, sibyte-users, Wim Van Sebroeck

Fixes the following linking problem:
drivers/watchdog/sb_wdog.c:211: undefined reference to `__udivdi3'

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Acked-by: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: sibyte-users@bitmover.com
Cc: Wim Van Sebroeck <wim@iguana.be>
---
This patch is for the upstream-sfr/mips-for-linux-next tree
---
 drivers/watchdog/sb_wdog.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c
index 25c7a3f..35b96738 100644
--- a/drivers/watchdog/sb_wdog.c
+++ b/drivers/watchdog/sb_wdog.c
@@ -170,6 +170,7 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd,
 						unsigned long arg)
 {
 	int ret = -ENOTTY;
+	u64 tmp_user_dog;
 	unsigned long time;
 	void __user *argp = (void __user *)arg;
 	int __user *p = argp;
@@ -208,7 +209,9 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd,
 		 * get the remaining count from the ... count register
 		 * which is 1*8 before the config register
 		 */
-		ret = put_user(__raw_readq(user_dog - 8) / 1000000, p);
+		tmp_user_dog = __raw_readq(user_dog - 8);
+		do_div(tmp_user_dog, 1000000);
+		ret = put_user(tmp_user_dog, p);
 		break;
 	}
 	return ret;
-- 
1.8.2.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-06-27 20:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-18 14:00 [PATCH v2 5/7] drivers: watchdog: sb_wdog: Fix 32bit linking problems Markos Chandras
2013-06-18 14:00 ` Markos Chandras
2013-06-18 14:14 ` Ralf Baechle
2013-06-19  7:45   ` Yousong Zhou
2013-06-19  7:48     ` Yousong Zhou
2013-06-19  8:55     ` Ralf Baechle
2013-06-27 19:59   ` Wim Van Sebroeck
2013-06-27 20:09   ` Wim Van Sebroeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.