diff options
author | Archit Taneja <archit@ti.com> | 2012-09-14 12:17:01 (GMT) |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-04-03 12:19:45 (GMT) |
commit | f5e484d8abd06d4d82bd556780746414f2f56988 (patch) | |
tree | e2b9a4f4a8a52d3085f69bac4ce33a2808af6cf9 | |
parent | a4419f3eac875e66a01b654024f6eda17d0dd558 (diff) | |
download | linux-fsl-qoriq-f5e484d8abd06d4d82bd556780746414f2f56988.tar.xz |
OMAPDSS: Generic DPI Panel: use devm_kzalloc for allocating driver data
Use devm_kzalloc instead of kzalloc to allocate driver data for the generic dpi
panel driver. This simplifies the driver's probe and remove functions.
Signed-off-by: Archit Taneja <archit@ti.com>
-rw-r--r-- | drivers/video/omap2/displays/panel-generic-dpi.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c index a0c9396..5fb8063 100644 --- a/drivers/video/omap2/displays/panel-generic-dpi.c +++ b/drivers/video/omap2/displays/panel-generic-dpi.c @@ -608,7 +608,7 @@ static int generic_dpi_panel_probe(struct omap_dss_device *dssdev) dssdev->panel.timings = panel_config->timings; - drv_data = kzalloc(sizeof(*drv_data), GFP_KERNEL); + drv_data = devm_kzalloc(&dssdev->dev, sizeof(*drv_data), GFP_KERNEL); if (!drv_data) return -ENOMEM; @@ -624,12 +624,8 @@ static int generic_dpi_panel_probe(struct omap_dss_device *dssdev) static void __exit generic_dpi_panel_remove(struct omap_dss_device *dssdev) { - struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev); - dev_dbg(&dssdev->dev, "remove\n"); - kfree(drv_data); - dev_set_drvdata(&dssdev->dev, NULL); } |