lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 20 Jun 2016 17:13:40 -0500
From:	"Andrew F. Davis" <afd@...com>
To:	Jacek Anaszewski <j.anaszewski@...sung.com>
CC:	Russell King <linux@...linux.org.uk>,
	Miguel Ojeda Sandonis <miguel.ojeda.sandonis@...il.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	Sebastian Reichel <sre@...nel.org>,
	Wolfram Sang <wsa@...-dreams.de>,
	Richard Purdie <rpurdie@...ys.net>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Mauro Carvalho Chehab <mchehab@....samsung.com>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Lauro Ramos Venancio <lauro.venancio@...nbossa.org>,
	Aloisio Almeida Jr <aloisio.almeida@...nbossa.org>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Ingo Molnar <mingo@...nel.org>, <linux-pwm@...r.kernel.org>,
	<lguest@...ts.ozlabs.org>, <linux-wireless@...r.kernel.org>,
	<linux-mmc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<linux-gpio@...r.kernel.org>, <linux-i2c@...r.kernel.org>,
	<linuxppc-dev@...ts.ozlabs.org>, <linux-leds@...r.kernel.org>,
	<linux-media@...r.kernel.org>
Subject: [PATCH] leds: Add no-op gpio_led_register_device when LED subsystem
 is disabled

Some systems use 'gpio_led_register_device' to make an in-memory copy of
their LED device table so the original can be removed as .init.rodata.
When the LED subsystem is not enabled source in the led directory is not
built and so this function may be undefined. Fix this here.

Signed-off-by: Andrew F. Davis <afd@...com>
---
 include/linux/leds.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/linux/leds.h b/include/linux/leds.h
index d2b1306..a4a3da6 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -386,8 +386,16 @@ struct gpio_led_platform_data {
                                        unsigned long *delay_off);
 };

+#ifdef CONFIG_NEW_LEDS
 struct platform_device *gpio_led_register_device(
                int id, const struct gpio_led_platform_data *pdata);
+#else
+static inline struct platform_device *gpio_led_register_device(
+               int id, const struct gpio_led_platform_data *pdata)
+{
+       return 0;
+}
+#endif

 enum cpu_led_event {
        CPU_LED_IDLE_START,     /* CPU enters idle */
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ