Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dddf7fed authored by Aditya Mathur's avatar Aditya Mathur Committed by Gerrit - the friendly Code Review server
Browse files

drivers: net: qti-can: Use div_u64 for 64-bit division



Use div_u64 to avoid compilation error in 32-bit
architectures.

Change-Id: I2a247dff5ee0a601deaee9e3375c5026788ef2df
Signed-off-by: default avatarAditya Mathur <aditmath@codeaurora.org>
Signed-off-by: default avatarGustavo Solaira <gustavos@codeaurora.org>
parent ed316bc4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <linux/of_gpio.h>
#include <linux/uaccess.h>
#include <linux/pm.h>
#include <asm/arch_timer.h>
#include <asm/div64.h>

#define DEBUG_QTI_CAN	0
@@ -449,7 +450,7 @@ static int qti_can_process_response(struct qti_can *priv_data,
			(struct can_time_info *)resp->data;

		if (priv_data->use_qtimer)
			mstime = (((s64)qtimer_time()) / NSEC_PER_MSEC);
			mstime = div_u64(qtimer_time(), NSEC_PER_MSEC);
		else
			mstime = ktime_to_ms(ktime_get_boottime());