aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2/displays/panel-lgphilips-lb035q02.c')
-rw-r--r--drivers/video/omap2/displays/panel-lgphilips-lb035q02.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
index 6e5abe8fd2dd..8effea8f2259 100644
--- a/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
+++ b/drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
@@ -89,27 +89,21 @@ static void lb035q02_panel_power_off(struct omap_dss_device *dssdev)
89static int lb035q02_panel_probe(struct omap_dss_device *dssdev) 89static int lb035q02_panel_probe(struct omap_dss_device *dssdev)
90{ 90{
91 struct lb035q02_data *ld; 91 struct lb035q02_data *ld;
92 int r;
93 92
94 dssdev->panel.timings = lb035q02_timings; 93 dssdev->panel.timings = lb035q02_timings;
95 94
96 ld = kzalloc(sizeof(*ld), GFP_KERNEL); 95 ld = devm_kzalloc(&dssdev->dev, sizeof(*ld), GFP_KERNEL);
97 if (!ld) { 96 if (!ld)
98 r = -ENOMEM; 97 return -ENOMEM;
99 goto err; 98
100 }
101 mutex_init(&ld->lock); 99 mutex_init(&ld->lock);
102 dev_set_drvdata(&dssdev->dev, ld); 100 dev_set_drvdata(&dssdev->dev, ld);
101
103 return 0; 102 return 0;
104err:
105 return r;
106} 103}
107 104
108static void lb035q02_panel_remove(struct omap_dss_device *dssdev) 105static void lb035q02_panel_remove(struct omap_dss_device *dssdev)
109{ 106{
110 struct lb035q02_data *ld = dev_get_drvdata(&dssdev->dev);
111
112 kfree(ld);
113} 107}
114 108
115static int lb035q02_panel_enable(struct omap_dss_device *dssdev) 109static int lb035q02_panel_enable(struct omap_dss_device *dssdev)