From edcd7199a55fbae445573c6dba35d1085586e747 Mon Sep 17 00:00:00 2001 From: Lijuan Gao Date: Tue, 10 Dec 2019 14:12:55 +0800 Subject: [PATCH] devfreq: Compilation error fix for 32-bit kernel This fixes below compilation error for 32bit kernel build. Comparison of distinct pointer types - 'unsigned long' with 'unsigned long long'. Change is to use uint64_t to fix this. Change-Id: I5c76433854eff81c850fb44381e418f2bdc1a8c7 Signed-off-by: Lijuan Gao --- drivers/devfreq/m4m-hwmon.c | 4 ++-- drivers/devfreq/msmcci-hwmon.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/devfreq/m4m-hwmon.c b/drivers/devfreq/m4m-hwmon.c index a9fd470dced8..21bcccb3c0fc 100644 --- a/drivers/devfreq/m4m-hwmon.c +++ b/drivers/devfreq/m4m-hwmon.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2015, 2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -221,7 +221,7 @@ static irqreturn_t m4m_hwmon_intr_handler(int irq, void *dev) return IRQ_NONE; } -static int count_to_mrps(unsigned long count, unsigned int us) +static int count_to_mrps(uint64_t count, unsigned int us) { do_div(count, us); count++; diff --git a/drivers/devfreq/msmcci-hwmon.c b/drivers/devfreq/msmcci-hwmon.c index ad0fa8f6e396..030ed0ffdfb9 100644 --- a/drivers/devfreq/msmcci-hwmon.c +++ b/drivers/devfreq/msmcci-hwmon.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2015, 2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -224,7 +224,7 @@ static unsigned long mon_read_count_single(struct msmcci_hwmon *m, int idx) return count; } -static int count_to_mrps(unsigned long count, unsigned int us) +static int count_to_mrps(uint64_t count, unsigned int us) { do_div(count, us); count++;