android_kernel_oneplus_msm8998/arch/powerpc/platforms/52xx
Himangi Saraogi 39e69f55f8 powerpc: Introduce the use of the managed version of kzalloc
This patch moves data allocated using kzalloc to managed data allocated
using devm_kzalloc and cleans now unnecessary kfree in probe function.

The following Coccinelle semantic patch was used for making the change:

@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
  .probe = probefn,
  .remove = removefn,
};

@prb@
identifier platform.probefn, pdev;
expression e, e1, e2;
@@
probefn(struct platform_device *pdev, ...) {
  <+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
  ...
?-kfree(e);
  ...+>
}

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2015-10-22 16:13:23 +02:00
..
efika.c
Kconfig
lite5200.c
lite5200_pm.c
lite5200_sleep.S
Makefile
media5200.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mpc52xx_common.c
mpc52xx_gpt.c powerpc: Introduce the use of the managed version of kzalloc 2015-10-22 16:13:23 +02:00
mpc52xx_lpbfifo.c powerpc: platforms: mpc52xx_lpbfifo: Fix module autoload for OF platform driver 2015-10-22 14:36:53 +02:00
mpc52xx_pci.c
mpc52xx_pic.c
mpc52xx_pm.c
mpc52xx_sleep.S
mpc5200_simple.c