mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
pwm: raspberrypi-poe: Fix endianness in firmware struct
[ Upstream commit09f688f071
] The reg member of struct raspberrypi_pwm_prop is a little endian 32 bit quantity. Explicitly convert the (native endian) value to little endian on assignment as is already done in raspberrypi_pwm_set_property(). This fixes the following sparse warning: drivers/pwm/pwm-raspberrypi-poe.c:69:24: warning: incorrect type in initializer (different base types) drivers/pwm/pwm-raspberrypi-poe.c:69:24: expected restricted __le32 [usertype] reg drivers/pwm/pwm-raspberrypi-poe.c:69:24: got unsigned int [usertype] reg Fixes:79caa362ea
("pwm: Add Raspberry Pi Firmware based PWM bus") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
2c0079979d
commit
c49c6a1bf0
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ static int raspberrypi_pwm_get_property(struct rpi_firmware *firmware,
|
|||
u32 reg, u32 *val)
|
||||
{
|
||||
struct raspberrypi_pwm_prop msg = {
|
||||
.reg = reg
|
||||
.reg = cpu_to_le32(reg),
|
||||
};
|
||||
int ret;
|
||||
|
||||
|
|
Loading…
Reference in a new issue