#
ada63f1e |
|
23-Jan-2024 |
Andrew Davis <afd@ti.com> |
power: supply: goldfish: Use devm_power_supply_register() helper Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240123163653.384385-5-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
#
df1953bc |
|
18-Sep-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
power: supply: goldfish_battery: Convert to platform remove callback returning 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(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230918133700.1254499-14-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
#
b770583b |
|
04-May-2022 |
Yang Li <yang.lee@linux.alibaba.com> |
power: supply: Remove unnecessary print function dev_err() The print function dev_err() is redundant because platform_get_irq() already prints an error. Eliminate the follow coccicheck warning: ./drivers/power/supply/goldfish_battery.c:225:2-9: line 225 is redundant because platform_get_irq() already prints an error Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
#
439cd7ed |
|
11-Sep-2020 |
Krzysztof Kozlowski <krzk@kernel.org> |
power: supply: goldfish: skip 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, the struct acpi_device_id becomes unused: drivers/power/supply/goldfish_battery.c:269:36: warning: 'goldfish_battery_acpi_match' defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
#
2aae471d |
|
19-Mar-2019 |
Thomas Gleixner <tglx@linutronix.de> |
drivers: power: supply: goldfish_battery: Fix bogus SPDX identifier spdxcheck.py complains: drivers/power/supply/goldfish_battery.c: 1:28 Invalid License ID: GPL which is correct because GPL is not a valid identifier. Of course this could have been caught by checkpatch.pl _before_ submitting or merging the patch. WARNING: 'SPDX-License-Identifier: GPL' is not supported in LICENSES/... #19: FILE: drivers/power/supply/goldfish_battery.c:1: +// SPDX-License-Identifier: GPL Which is absolutely hillarious as the commit introducing this wreckage says in the changelog: There was a checkpatch complain: "Missing or malformed SPDX-License-Identifier tag". Oh well. Replacing a checkpatch warning by a different checkpatch warning is a really useful exercise. Use the proper GPL-2.0 identifier which is what the boiler plate in the file had originally. Fixes: e75e3a125b40 ("drivers: power: supply: goldfish_battery: Put an SPDX tag") Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
2a7b0a29 |
|
18-Dec-2018 |
Roman Kiryanov <rkir@google.com> |
drivers: power: supply: goldfish_battery: Add support for reading more properties To comply with tests we need to support more power supply properties: POWER_SUPPLY_PROP_VOLTAGE_NOW POWER_SUPPLY_PROP_TEMP POWER_SUPPLY_PROP_CHARGE_COUNTER POWER_SUPPLY_PROP_CURRENT_NOW POWER_SUPPLY_PROP_CURRENT_AVG POWER_SUPPLY_PROP_CHARGE_FULL POWER_SUPPLY_PROP_CYCLE_COUNT POWER_SUPPLY_PROP_VOLTAGE_MAX POWER_SUPPLY_PROP_CURRENT_MAX Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
#
3dcdb689 |
|
18-Dec-2018 |
Roman Kiryanov <rkir@google.com> |
drivers: power: supply: goldfish_battery: Use tabs for alignment Tabs are preferred. Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
#
617ee863 |
|
18-Dec-2018 |
Roman Kiryanov <rkir@google.com> |
drivers: power: supply: goldfish_battery: Fix alignment Align two values as other values below. Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
#
5fbde356 |
|
18-Dec-2018 |
Roman Kiryanov <rkir@google.com> |
drivers: power: supply: goldfish_battery: Retire a redundant variable The battery_data static variable was not used. Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
#
65ab18a1 |
|
18-Dec-2018 |
Roman Kiryanov <rkir@google.com> |
drivers: power: supply: goldfish_battery: Fix "line over 80 characters" There was a line longer than 80 characters. Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
#
e75e3a12 |
|
18-Dec-2018 |
Roman Kiryanov <rkir@google.com> |
drivers: power: supply: goldfish_battery: Put an SPDX tag There was a checkpatch complain: "Missing or malformed SPDX-License-Identifier tag". Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
#
8c0984e5 |
|
17-Jun-2016 |
Sebastian Reichel <sre@kernel.org> |
power: move power supply drivers to power/supply This moves all power supply drivers from drivers/power/ to drivers/power/supply/. The intention is a cleaner source tree, since drivers/power/ also contains frameworks unrelated to power supply, like adaptive voltage scaling. Signed-off-by: Sebastian Reichel <sre@kernel.org>
|