History log of /linux-master/drivers/leds/leds-clevo-mail.c
Revision Date Author Comments
# 60613020 17-Sep-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

leds: Convert all platform drivers to return void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() is renamed to .remove().

All platform drivers below drivers/leds/ unconditionally return zero in
their remove callback and so can be converted trivially to the variant
returning void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230917130947.1122198-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones <lee@kernel.org>


# 09c434b8 19-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Add SPDX license identifier for more missed files

Add SPDX license identifiers to all files which:

- Have no license information of any form

- Have MODULE_LICENCE("GPL*") inside which was used in the initial
scan/conversion to ignore the file

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

GPL-2.0-only

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6faadbbb 14-Sep-2017 Christoph Hellwig <hch@lst.de>

dmi: Mark all struct dmi_system_id instances const

... and __initconst if applicable.

Based on similar work for an older kernel in the Grsecurity patch.

[JD: fix toshiba-wmi build]
[JD: add htcpen]
[JD: move __initconst where checkscript wants it]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jean Delvare <jdelvare@suse.de>


# 81902d5f 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

leds: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


# 0016db26 13-Mar-2014 Jean Delvare <jdelvare@suse.de>

leds: clevo-mail: Make probe function __init

One of the benefits of platform_driver_probe() is that you can make
the probe function __init.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Bryan Wu <cooloney@gmail.com>


# aad0f292 28-Feb-2014 Jingoo Han <jg1.han@samsung.com>

leds: clevo-mail: remove __initdata marker

Remove __initdata marker, because it is not right for a module
parameter. It will make the kernel oops problem.

(cooloney@gmail.com: update commit message since it's really a
wrong notation)

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bryan Wu <cooloney@gmail.com>


# 939086ea 07-Aug-2013 Sachin Kamat <sachin.kamat@linaro.org>

leds: clevo-mail: Fix incorrect placement of __initdata

__initdata should be placed between the variable name and equal
sign for the variable to be placed in the intended section.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Márton Németh <nm127@freemail.hu>
Signed-off-by: Bryan Wu <cooloney@gmail.com>


# 5c6f844c 27-Nov-2012 Sachin Kamat <sachin.kamat@linaro.org>

leds: leds-clevo-mail: Use pr_* instead of printks

Silences checkpatch warnings related to the use of printks.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Bryan Wu <cooloney@gmail.com>


# 98ea1ea2 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

leds: remove use of __devinit

CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Jan-Simon Moeller <jansimon.moeller@gmx.de>
Acked-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ee539a93 01-Aug-2012 Ondrej Zary <linux@rainbow-software.org>

leds-clevo-mail: Fix Clevo M5x0V DMI strings

There are more variants of Clevo M5x0V laptops and Positivo Mobile is just one of them.
Another one is UMAX VisionBook 2400WXC. Use only generic Clevo DMI strings to match all
variants.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>


# 96f09791 01-Aug-2012 Ondrej Zary <linux@rainbow-software.org>

leds-clevo-mail: add MODULE_DEVICE_TABLE

Enable autoloading of leds-clevo-mail by using MODULE_DEVICE_TABLE.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>


# 90ab5ee9 12-Jan-2012 Rusty Russell <rusty@rustcorp.com.au>

module_param: make bool parameters really bool (drivers & misc)

module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>


# 181d683d 16-Sep-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: libps2 - additional locking for i8042 ports

The serio ports on i8042 are not completely isolated; while we provide
enough locking to ensure proper serialization when accessing control
and data registers AUX and KBD ports can still have an effect on each
other on PS/2 protocol level. The most prominent effect is that
issuing a command for the device connected to one port may cause
abort of the command currently executing by the device connected to
another port.

Since i8042 nor serio subsystem are not aware of the details of the
PS/2 protocol (length of the commands and their replies and so on) the
locking should be done on libps2 level by adding special handling when
we see that we are dealing with serio port on i8042.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# f16a5dba 11-Jul-2009 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

leds: move leds-clevo-mail's probe function to .devinit.text

A pointer to clevo_mail_led_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>


# 859cb7f2 08-Jan-2009 Richard Purdie <rpurdie@linux.intel.com>

leds: Add suspend/resume to the core class

Add suspend/resume to the core class and remove all the now unneeded
code from various drivers. Originally the class code couldn't support
suspend/resume but since class_device can there is no reason for
each driver doing its own suspend/resume anymore.


# 4d404fd5 09-Mar-2008 Németh Márton <nm127@freemail.hu>

leds: Cleanup various whitespace and code style issues

Break the lines which were more than 80 characters into more
lines; replace SPACEs with TABs; correct ident at switch-case;
change character encoding from ISO-8859-2 to UTF-8.

The order of the functions in led-triggers.c changed in order
the similar functions can still be together under titles
"Used by LED Class", "LED Trigger Interface" and "Simple
LED Tigger Interface" as was grouped before when exported
with EXPORT_SYMBOL.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>


# b3ba31f8 09-Mar-2008 Mrton Nmeth <nm127@freemail.hu>

leds: Add mail LED support for "Clevo D400P"

The leds-clevo-mail module also works with model "Clevo D400P",
add this model to the white list.

Signed-off-by: Mrton Nmeth <nm127@freemail.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>


# 3c4ded97 15-Apr-2008 Kay Sievers <kay.sievers@vrfy.org>

leds: fix platform driver hotplug/coldplug

Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform
modalias is prefixed with "platform:". Add MODULE_ALIAS() to the
hotpluggable platform LED drivers, to re-enable auto loading.

[dbrownell@users.sourceforge.net: more drivers, registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 92e015cb 31-Oct-2007 Márton Németh <nm127@freemail.hu>

leds: hw acceleration for Clevo mail LED driver

Add support for hardware accelerated LED blinking for the mail LED
commonly found on Clevo notebooks.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>


# 6c152bee 31-Oct-2007 Richard Purdie <rpurdie@rpsys.net>

leds: Standardise LED naming scheme

As discussed on LKML some notion of 'function' is needed in
LED naming. This patch adds this to the documentation and
standardises existing LED drivers.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>


# cec035de 31-Oct-2007 Márton Németh <nm127@freemail.hu>

leds: Add clevo notebook LED driver

The driver supports the mail LED commonly found on different Clevo notebooks.
The driver access the LED through the i8042 hardware which is handled by
the input subsystem.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>