diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-08-07 00:37:57 +0200 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.co.uk> | 2017-08-11 18:54:35 +0200 |
commit | 18a89d5c7ce873e5d813a135bf4e12d75b9d95c7 (patch) | |
tree | ee65c364525a9ed2fc340336deea91d808339655 /drivers | |
parent | 0299484e4ddc330f3a64f7310683e673a25e6482 (diff) |
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')
-rw-r--r-- | drivers/power/supply/charger-manager.c | 3 |
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; |