2021-02-24 15:28:35

by Daniel Lezcano

[permalink] [raw]
Subject: [PATCH v2 4/9] iio/drivers/as73211: Use HZ macros

HZ unit conversion macros are available in units.h, use them and
remove the duplicate definition.

Signed-off-by: Daniel Lezcano <[email protected]>
Reviewed-by: Christian Eggers <[email protected]>
---
drivers/iio/light/as73211.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iio/light/as73211.c b/drivers/iio/light/as73211.c
index 7b32dfaee9b3..3ba2378df3dd 100644
--- a/drivers/iio/light/as73211.c
+++ b/drivers/iio/light/as73211.c
@@ -24,8 +24,7 @@
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/pm.h>
-
-#define HZ_PER_KHZ 1000
+#include <linux/units.h>

#define AS73211_DRV_NAME "as73211"

--
2.17.1


2021-03-14 17:02:07

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH v2 4/9] iio/drivers/as73211: Use HZ macros

On Wed, 24 Feb 2021 15:42:14 +0100
Daniel Lezcano <[email protected]> wrote:

> HZ unit conversion macros are available in units.h, use them and
> remove the duplicate definition.
>
> Signed-off-by: Daniel Lezcano <[email protected]>
> Reviewed-by: Christian Eggers <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>

> ---
> drivers/iio/light/as73211.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/iio/light/as73211.c b/drivers/iio/light/as73211.c
> index 7b32dfaee9b3..3ba2378df3dd 100644
> --- a/drivers/iio/light/as73211.c
> +++ b/drivers/iio/light/as73211.c
> @@ -24,8 +24,7 @@
> #include <linux/module.h>
> #include <linux/mutex.h>
> #include <linux/pm.h>
> -
> -#define HZ_PER_KHZ 1000
> +#include <linux/units.h>
>
> #define AS73211_DRV_NAME "as73211"
>