]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
pwm: raspberrypi-poe: Fix endianness in firmware struct
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 8 Apr 2022 15:38:46 +0000 (17:38 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 26 Aug 2022 08:52:36 +0000 (10:52 +0200)
commit3c15cabe33ae62b3a9832f578d0eb934b86b9a4f
tree4812fc6108f0d8e0a8aaae91c2a2881fa442f88e
parentf2ca6b4535135e0f75dc84b872b649b296b94f66
pwm: raspberrypi-poe: Fix endianness in firmware struct

BugLink: https://bugs.launchpad.net/bugs/1982968
[ Upstream commit 09f688f0718f57f9cf68ee1aa94490f641e759ba ]

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: 79caa362eab6 ("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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/pwm/pwm-raspberrypi-poe.c