summaryrefslogtreecommitdiffstats
path: root/drivers/power/supply/charger-manager.c
Commit message (Collapse)AuthorAgeFilesLines
* power: supply: charger-manager: Slighly simplify codeChristophe JAILLET2017-08-111-2/+1
| | | | | | | | Use 'sizeof(*var)' instead of the equivalent 'sizeof(data structure type)' because it is less verbose. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
* power: supply: charger-manager: Fix a commentChristophe JAILLET2017-08-111-2/+2
| | | | | | | | Update a comment which is no more up to date since commit 2ed9e9b653095. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
* power: supply: charger-manager: Fix a NULL pointer dereference in ↵Christophe JAILLET2017-08-111-0/+2
| | | | | | | | | | 'charger_manager_probe()' 'devm_kzalloc()' can return NULL. Return -ENOMEM in this case in order to avoid a NULL pointer dereference later on. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
* power: supply: charger-manager: simplify return statementsAndi Shyti2017-04-141-21/+14
| | | | | | | | | | | | | | | | Some trivial improvements on the returning value of the functions: - remove unnecessary goto labels that just return, return immediately, instead. - do not initialize when not needed. - return the value from the calling function that fails instead of politically choosing -EINVAL. Signed-off-by: Andi Shyti <andi@etezian.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: move power supply drivers to power/supplySebastian Reichel2016-08-111-0/+2074
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>