aboutsummaryrefslogtreecommitdiff
path: root/drivers/power/reset/qnap-poweroff.c
AgeCommit message (Collapse)AuthorFilesLines
2023-11-15power: reset: qnap-poweroff: Convert to platform remove callback returning voidUwe Kleine-König1-3/+2
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() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
2020-11-30power: reset: Use printk format symbol resolverHelge Deller1-6/+2
Instead of looking up a symbol name by hand, use the %ps printk format specifier. Signed-off-by: Helge Deller <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152Thomas Gleixner1-5/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-10-20power: reset: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <[email protected]>
2014-03-04Power: Reset: Generalize qnap-poweroff to work on Synology devices.Andrew Lunn1-12/+37
The Synology NAS devices use a very similar mechanism to QNAP NAS devices to power off. Both send a single charactor command to a PIC, over the second serial port. However the baud rate and the command differ. Generalize the driver to support this. Signed-off-by: Ben Peddell <[email protected]> Signed-off-by: Andrew Lunn <[email protected]> Acked-by: Jason Cooper <[email protected]> Cc: Anton Vorontsov <[email protected]> Cc: Dmitry Eremin-Solenikov <[email protected]> Cc: David Woodhouse <[email protected]> Signed-off-by: Jason Cooper <[email protected]>
2013-01-19qnap-poweroff: Fix license stringAndrew Lunn1-1/+1
GPLv2+ is not a valid license string. Replace it with one that is. Signed-off-by: Andrew Lunn <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]>
2013-01-06power/reset: Add a new driver to turn QNAP board power offAndrew Lunn1-0/+116
The QNAP NAS boxes have a microcontroller attached to the SoCs second serial port. By sending it a simple command, it will turn the power for the board off. This driver registers a function for pm_power_off to send such a command. Signed-off-by: Andrew Lunn <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]>