Skip to content

Commit

Permalink
iio/drivers/hid-sensor: use HZ macros
Browse files Browse the repository at this point in the history
HZ unit conversion macros are available in units.h, use them and remove
the duplicate definition.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Daniel Lezcano <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
Cc: Chanwoo Choi <[email protected]>
Cc: Christian Eggers <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: Kyungmin Park <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>
Cc: Lukasz Luba <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Miquel Raynal <[email protected]>
Cc: MyungJoo Ham <[email protected]>
Cc: Peter Meerwald <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Zhang Rui <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dlezcano authored and torvalds committed Sep 8, 2021
1 parent d59eaca commit 87000e7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/iio/common/hid-sensors/hid-sensor-attributes.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/time.h>
#include <linux/units.h>

#include <linux/hid-sensor-hub.h>
#include <linux/iio/iio.h>

#define HZ_PER_MHZ 1000000L

static struct {
u32 usage_id;
int unit; /* 0 for default others from HID sensor spec */
Expand Down

0 comments on commit 87000e7

Please sign in to comment.