Browse Source

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>
Christophe JAILLET 8 years ago
parent
commit
18a89d5c7c
1 changed files with 1 additions and 2 deletions
  1. 1 2
      drivers/power/supply/charger-manager.c

+ 1 - 2
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;