diff mbox series

[v2,3/3] iio: common: scmi_sensors: use HZ macro from units.h

Message ID 20220729172332.19118-4-ddrokosov@sberdevices.ru (mailing list archive)
State Changes Requested
Headers show
Series units: complement the set of Hz units | expand

Commit Message

Dmitry Rokosov July 29, 2022, 5:23 p.m. UTC
Remove duplicated definition of UHZ_PER_HZ, because it's available in
the units.h.

Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
---
 drivers/iio/common/scmi_sensors/scmi_iio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Shevchenko July 29, 2022, 6:04 p.m. UTC | #1
On Fri, Jul 29, 2022 at 7:23 PM Dmitry Rokosov <DDRokosov@sberdevices.ru> wrote:
>
> Remove duplicated definition of UHZ_PER_HZ, because it's available in
> the units.h.

Fine to me in principle (whatever name it gets after all)
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
> ---
>  drivers/iio/common/scmi_sensors/scmi_iio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/common/scmi_sensors/scmi_iio.c b/drivers/iio/common/scmi_sensors/scmi_iio.c
> index 793d628db55f..c6d2cf5504cb 100644
> --- a/drivers/iio/common/scmi_sensors/scmi_iio.c
> +++ b/drivers/iio/common/scmi_sensors/scmi_iio.c
> @@ -18,6 +18,7 @@
>  #include <linux/scmi_protocol.h>
>  #include <linux/time.h>
>  #include <linux/types.h>
> +#include <linux/units.h>
>
>  #define SCMI_IIO_NUM_OF_AXIS 3
>
> @@ -130,7 +131,6 @@ static const struct iio_buffer_setup_ops scmi_iio_buffer_ops = {
>  static int scmi_iio_set_odr_val(struct iio_dev *iio_dev, int val, int val2)
>  {
>         struct scmi_iio_priv *sensor = iio_priv(iio_dev);
> -       const unsigned long UHZ_PER_HZ = 1000000UL;
>         u64 sec, mult, uHz, sf;
>         u32 sensor_config;
>         char buf[32];
> --
> 2.36.0
diff mbox series

Patch

diff --git a/drivers/iio/common/scmi_sensors/scmi_iio.c b/drivers/iio/common/scmi_sensors/scmi_iio.c
index 793d628db55f..c6d2cf5504cb 100644
--- a/drivers/iio/common/scmi_sensors/scmi_iio.c
+++ b/drivers/iio/common/scmi_sensors/scmi_iio.c
@@ -18,6 +18,7 @@ 
 #include <linux/scmi_protocol.h>
 #include <linux/time.h>
 #include <linux/types.h>
+#include <linux/units.h>
 
 #define SCMI_IIO_NUM_OF_AXIS 3
 
@@ -130,7 +131,6 @@  static const struct iio_buffer_setup_ops scmi_iio_buffer_ops = {
 static int scmi_iio_set_odr_val(struct iio_dev *iio_dev, int val, int val2)
 {
 	struct scmi_iio_priv *sensor = iio_priv(iio_dev);
-	const unsigned long UHZ_PER_HZ = 1000000UL;
 	u64 sec, mult, uHz, sf;
 	u32 sensor_config;
 	char buf[32];