summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2017-08-07 00:37:57 +0200
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>2017-08-11 18:54:35 +0200
commit18a89d5c7ce873e5d813a135bf4e12d75b9d95c7 (patch)
treeee65c364525a9ed2fc340336deea91d808339655 /drivers/power
parent0299484e4ddc330f3a64f7310683e673a25e6482 (diff)
downloadlinux-18a89d5c7ce873e5d813a135bf4e12d75b9d95c7.tar.bz2
power: supply: charger-manager: Slighly simplify code
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>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/charger-manager.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
index 83c08c8e2c32..6502fa7c2106 100644
--- a/drivers/power/supply/charger-manager.c
+++ b/drivers/power/supply/charger-manager.c
@@ -1632,8 +1632,7 @@ static int charger_manager_probe(struct platform_device *pdev)
return -ENODEV;
}
- cm = devm_kzalloc(&pdev->dev,
- sizeof(struct charger_manager), GFP_KERNEL);
+ cm = devm_kzalloc(&pdev->dev, sizeof(*cm), GFP_KERNEL);
if (!cm)
return -ENOMEM;