diff options
author | Sudeep Holla <sudeep.holla@arm.com> | 2019-08-07 13:46:27 +0100 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2019-08-12 12:23:01 +0100 |
commit | aa90ac45bc88e6a8efb199e45dab5d5a6b01c3d2 (patch) | |
tree | 79bc74c9ea824252cf4724b13ee267a21664401e /drivers/firmware/arm_scmi/common.h | |
parent | 2bc06ffa0635e99cd4d88d6f6fe5bb4e4b9e50f1 (diff) |
firmware: arm_scmi: Use {get,put}_unaligned_le{32,64} accessors
Instead of type-casting the {tx,rx}.buf all over the place while
accessing them to read/write __le{32,64} from/to the firmware, let's
use the existing {get,put}_unaligned_le{32,64} accessors to hide all
the type cast ugliness.
Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware/arm_scmi/common.h')
-rw-r--r-- | drivers/firmware/arm_scmi/common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h index 43884e4ceac5..5237c2ff79fe 100644 --- a/drivers/firmware/arm_scmi/common.h +++ b/drivers/firmware/arm_scmi/common.h @@ -15,6 +15,8 @@ #include <linux/scmi_protocol.h> #include <linux/types.h> +#include <asm/unaligned.h> + #define PROTOCOL_REV_MINOR_MASK GENMASK(15, 0) #define PROTOCOL_REV_MAJOR_MASK GENMASK(31, 16) #define PROTOCOL_REV_MAJOR(x) (u16)(FIELD_GET(PROTOCOL_REV_MAJOR_MASK, (x))) |