* [PATCH 1/2] regulator: mc13783: Convert to devm_kzalloc()
@ 2011-12-29 15:56 Fabio Estevam
2011-12-29 15:56 ` [PATCH 2/2] regulator: mc13892: " Fabio Estevam
2011-12-29 17:59 ` [PATCH 1/2] regulator: mc13783: " Mark Brown
0 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2011-12-29 15:56 UTC (permalink / raw)
To: broonie; +Cc: kernel, linux-kernel, Fabio Estevam
Convert mc13783-regulator driver to use devm_kzalloc().
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/regulator/mc13783-regulator.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c
index 8479082..04e1915 100644
--- a/drivers/regulator/mc13783-regulator.c
+++ b/drivers/regulator/mc13783-regulator.c
@@ -344,7 +344,7 @@ static int __devinit mc13783_regulator_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "%s id %d\n", __func__, pdev->id);
- priv = kzalloc(sizeof(*priv) +
+ priv = devm_kzalloc(&pdev->dev, sizeof(*priv) +
pdata->num_regulators * sizeof(priv->regulators[0]),
GFP_KERNEL);
if (!priv)
@@ -374,8 +374,6 @@ err:
while (--i >= 0)
regulator_unregister(priv->regulators[i]);
- kfree(priv);
-
return ret;
}
@@ -391,7 +389,6 @@ static int __devexit mc13783_regulator_remove(struct platform_device *pdev)
for (i = 0; i < pdata->num_regulators; i++)
regulator_unregister(priv->regulators[i]);
- kfree(priv);
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] regulator: mc13892: Convert to devm_kzalloc()
2011-12-29 15:56 [PATCH 1/2] regulator: mc13783: Convert to devm_kzalloc() Fabio Estevam
@ 2011-12-29 15:56 ` Fabio Estevam
2011-12-29 17:59 ` Mark Brown
2011-12-29 17:59 ` [PATCH 1/2] regulator: mc13783: " Mark Brown
1 sibling, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2011-12-29 15:56 UTC (permalink / raw)
To: broonie; +Cc: kernel, linux-kernel, Fabio Estevam
Convert mc13892-regulator driver to use devm_kzalloc().
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/regulator/mc13892-regulator.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c
index 023d17d..dd389dd 100644
--- a/drivers/regulator/mc13892-regulator.c
+++ b/drivers/regulator/mc13892-regulator.c
@@ -531,7 +531,7 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev)
int i, ret;
u32 val;
- priv = kzalloc(sizeof(*priv) +
+ priv = devm_kzalloc(&pdev->dev, sizeof(*priv) +
pdata->num_regulators * sizeof(priv->regulators[0]),
GFP_KERNEL);
if (!priv)
@@ -592,7 +592,6 @@ err:
err_free:
mc13xxx_unlock(mc13892);
- kfree(priv);
return ret;
}
@@ -609,7 +608,6 @@ static int __devexit mc13892_regulator_remove(struct platform_device *pdev)
for (i = 0; i < pdata->num_regulators; i++)
regulator_unregister(priv->regulators[i]);
- kfree(priv);
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] regulator: mc13783: Convert to devm_kzalloc()
2011-12-29 15:56 [PATCH 1/2] regulator: mc13783: Convert to devm_kzalloc() Fabio Estevam
2011-12-29 15:56 ` [PATCH 2/2] regulator: mc13892: " Fabio Estevam
@ 2011-12-29 17:59 ` Mark Brown
1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2011-12-29 17:59 UTC (permalink / raw)
To: Fabio Estevam; +Cc: kernel, linux-kernel, Fabio Estevam
On Thu, Dec 29, 2011 at 01:56:02PM -0200, Fabio Estevam wrote:
> Convert mc13783-regulator driver to use devm_kzalloc().
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] regulator: mc13892: Convert to devm_kzalloc()
2011-12-29 15:56 ` [PATCH 2/2] regulator: mc13892: " Fabio Estevam
@ 2011-12-29 17:59 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2011-12-29 17:59 UTC (permalink / raw)
To: Fabio Estevam; +Cc: kernel, linux-kernel, Fabio Estevam
On Thu, Dec 29, 2011 at 01:56:03PM -0200, Fabio Estevam wrote:
> Convert mc13892-regulator driver to use devm_kzalloc().
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
This one doesn't apply against current -next, please recheck.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] regulator: mc13892: Convert to devm_kzalloc()
[not found] <1325174163-27955-2-git-send-email-festevam@gmail .com>
@ 2011-12-29 22:05 ` Fabio Estevam
2011-12-30 2:07 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2011-12-29 22:05 UTC (permalink / raw)
To: broonie; +Cc: kernel, linux-kernel, Fabio Estevam
Convert mc13892-regulator driver to use devm_kzalloc().
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Rebased against latest linux-next
drivers/regulator/mc13892-regulator.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c
index 46bfa4a..e8cfc99 100644
--- a/drivers/regulator/mc13892-regulator.c
+++ b/drivers/regulator/mc13892-regulator.c
@@ -538,7 +538,7 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev)
if (num_regulators <= 0)
return -EINVAL;
- priv = kzalloc(sizeof(*priv) +
+ priv = devm_kzalloc(&pdev->dev, sizeof(*priv) +
num_regulators * sizeof(priv->regulators[0]),
GFP_KERNEL);
if (!priv)
@@ -615,7 +615,6 @@ err:
err_free:
mc13xxx_unlock(mc13892);
- kfree(priv);
return ret;
}
@@ -630,7 +629,6 @@ static int __devexit mc13892_regulator_remove(struct platform_device *pdev)
for (i = 0; i < priv->num_regulators; i++)
regulator_unregister(priv->regulators[i]);
- kfree(priv);
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] regulator: mc13892: Convert to devm_kzalloc()
2011-12-29 22:05 ` [PATCH v2 2/2] regulator: mc13892: " Fabio Estevam
@ 2011-12-30 2:07 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2011-12-30 2:07 UTC (permalink / raw)
To: Fabio Estevam; +Cc: kernel, linux-kernel, Fabio Estevam
On Thu, Dec 29, 2011 at 08:05:00PM -0200, Fabio Estevam wrote:
> Convert mc13892-regulator driver to use devm_kzalloc().
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-12-30 2:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-29 15:56 [PATCH 1/2] regulator: mc13783: Convert to devm_kzalloc() Fabio Estevam
2011-12-29 15:56 ` [PATCH 2/2] regulator: mc13892: " Fabio Estevam
2011-12-29 17:59 ` Mark Brown
2011-12-29 17:59 ` [PATCH 1/2] regulator: mc13783: " Mark Brown
[not found] <1325174163-27955-2-git-send-email-festevam@gmail .com>
2011-12-29 22:05 ` [PATCH v2 2/2] regulator: mc13892: " Fabio Estevam
2011-12-30 2:07 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).