aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/media/platform/omap3isp/isphist.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-12-25 17:27:31 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-05 14:49:17 -0200
commitcf2b4cf661bd183791ebc0a7ab091de77a1748b0 (patch)
treef46112fb67c7f8cca87abe7788bb4ff5d0d90bc0 /drivers/media/platform/omap3isp/isphist.c
parent[media] omap3isp: Remove unneeded memset after kzalloc (diff)
downloadwireguard-linux-cf2b4cf661bd183791ebc0a7ab091de77a1748b0.tar.xz
wireguard-linux-cf2b4cf661bd183791ebc0a7ab091de77a1748b0.zip
[media] omap3isp: Use devm_* managed functions
Replace kzalloc, request_mem_region, ioremap, clk_get and regulator_get with their devm_* managed replacement. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/omap3isp/isphist.c')
-rw-r--r--drivers/media/platform/omap3isp/isphist.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/platform/omap3isp/isphist.c b/drivers/media/platform/omap3isp/isphist.c
index da2fa98b501a..2ccc4e5702b2 100644
--- a/drivers/media/platform/omap3isp/isphist.c
+++ b/drivers/media/platform/omap3isp/isphist.c
@@ -477,7 +477,7 @@ int omap3isp_hist_init(struct isp_device *isp)
struct omap3isp_hist_config *hist_cfg;
int ret = -1;
- hist_cfg = kzalloc(sizeof(*hist_cfg), GFP_KERNEL);
+ hist_cfg = devm_kzalloc(isp->dev, sizeof(*hist_cfg), GFP_KERNEL);
if (hist_cfg == NULL)
return -ENOMEM;
@@ -503,7 +503,6 @@ int omap3isp_hist_init(struct isp_device *isp)
ret = omap3isp_stat_init(hist, "histogram", &hist_subdev_ops);
if (ret) {
- kfree(hist_cfg);
if (HIST_USING_DMA(hist))
omap_free_dma(hist->dma_ch);
}
@@ -518,6 +517,5 @@ void omap3isp_hist_cleanup(struct isp_device *isp)
{
if (HIST_USING_DMA(&isp->isp_hist))
omap_free_dma(isp->isp_hist.dma_ch);
- kfree(isp->isp_hist.priv);
omap3isp_stat_cleanup(&isp->isp_hist);
}