From dd3fb175c5f4daa41c8f21cc5d1376c3f8fb0676 Mon Sep 17 00:00:00 2001 From: Alex Van Damme Date: Tue, 4 Sep 2018 12:31:36 -0700 Subject: [PATCH] Cleanup apex performance patch Change-Id: I9a419ef63cee937b7b4c183c9070be011555f8d4 --- apex_driver.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apex_driver.c b/apex_driver.c index 617841f..e34b34e 100644 --- a/apex_driver.c +++ b/apex_driver.c @@ -27,7 +27,7 @@ /* Constants */ #define APEX_DEVICE_NAME "Apex" -#define APEX_DRIVER_VERSION "1.0" +#define APEX_DRIVER_VERSION "1.1" /* CSRs are in BAR 2. */ #define APEX_BAR_INDEX 2 @@ -489,7 +489,9 @@ static long apex_clock_gating(struct gasket_dev *gasket_dev, } /* apex_set_performance_expectation: Adjust clock rates for Apex. */ -static long apex_set_performance_expectation(struct gasket_dev *gasket_dev, ulong arg) +static long apex_set_performance_expectation( + struct gasket_dev *gasket_dev, + struct apex_performance_expectation_ioctl __user *argp) { struct apex_performance_expectation_ioctl ibuf; uint32_t rg_gcb_clk_div = 0; @@ -503,7 +505,7 @@ static long apex_set_performance_expectation(struct gasket_dev *gasket_dev, ulon if (bypass_top_level) return 0; - if (copy_from_user(&ibuf, (void __user *)arg, sizeof(ibuf))) + if (copy_from_user(&ibuf, argp, sizeof(ibuf))) return -EFAULT; switch (ibuf.performance) {