linux-stable/include/soc
Geert Uytterhoeven 150efd30c3 soc: bcm2835: Make !RASPBERRYPI_FIRMWARE dummies return failure
[ Upstream commit 144345a4a8 ]

If CONFIG_RASPBERRYPI_FIRMWARE=n:

    drivers/gpio/gpio-raspberrypi-exp.c: In function ‘rpi_exp_gpio_get_polarity’:
    drivers/gpio/gpio-raspberrypi-exp.c:71: warning: ‘get.polarity’ is used uninitialized in this function
    drivers/gpio/gpio-raspberrypi-exp.c: In function ‘rpi_exp_gpio_get_direction’:
    drivers/gpio/gpio-raspberrypi-exp.c:150: warning: ‘get.direction’ is used uninitialized in this function

The dummy firmware interface functions return 0, which means success,
causing subsequent code to make use of the never initialized output
parameter.

Fix this by making the dummy functions return an error code (-ENOSYS)
instead.

Note that this assumes the firmware always fills in the requested data
in the CONFIG_RASPBERRYPI_FIRMWARE=y case.

Fixes: d45f1a563b ("staging: vc04_services: fix up rpi firmware functions")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:02:42 +09:00
..
arc ARC: mcip: update MCIP debug mask when the new cpu came online 2018-05-30 07:52:07 +02:00
at91 ARM: at91: define LPDDR types 2017-01-16 23:21:29 +01:00
bcm2835 soc: bcm2835: Make !RASPBERRYPI_FIRMWARE dummies return failure 2018-06-21 04:02:42 +09:00
brcmstb soc: add stubs for brcmstb SoC's 2015-09-14 15:44:18 -07:00
fsl net/wan/fsl_ucc_hdlc: add hdlc-bus support 2017-05-18 10:28:39 -04:00
imx ARM: imx6: fix static declaration in include/soc/imx/cpuidle.h 2016-06-21 14:35:29 +08:00
mediatek iommu/mediatek: Add mt2712 IOMMU support 2017-08-22 16:37:58 +02:00
nps soc: Support for NPS HW scheduling 2016-11-30 11:54:25 -08:00
rockchip soc: rockchip: add header for ddr rate SIP interface 2016-08-31 18:53:24 +02:00
sa1100 ARM: 8361/1: sa1100: add platform functions to handle PWER settings 2015-05-18 22:00:22 +01:00
tegra soc/tegra: Register SoC device 2017-08-17 16:43:13 +02:00