diff options
-rw-r--r-- | drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c | 58 | ||||
-rw-r--r-- | include/video/omap-panel-data.h | 12 |
2 files changed, 6 insertions, 64 deletions
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c b/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c index d811e6dcaef7..f2abbec7602a 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <drm/drm_edid.h> | 17 | #include <drm/drm_edid.h> |
18 | 18 | ||
19 | #include <video/omapdss.h> | 19 | #include <video/omapdss.h> |
20 | #include <video/omap-panel-data.h> | ||
21 | 20 | ||
22 | static const struct omap_video_timings dvic_default_timings = { | 21 | static const struct omap_video_timings dvic_default_timings = { |
23 | .x_res = 640, | 22 | .x_res = 640, |
@@ -236,46 +235,6 @@ static struct omap_dss_driver dvic_driver = { | |||
236 | .detect = dvic_detect, | 235 | .detect = dvic_detect, |
237 | }; | 236 | }; |
238 | 237 | ||
239 | static int dvic_probe_pdata(struct platform_device *pdev) | ||
240 | { | ||
241 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); | ||
242 | struct connector_dvi_platform_data *pdata; | ||
243 | struct omap_dss_device *in, *dssdev; | ||
244 | int i2c_bus_num; | ||
245 | |||
246 | pdata = dev_get_platdata(&pdev->dev); | ||
247 | i2c_bus_num = pdata->i2c_bus_num; | ||
248 | |||
249 | if (i2c_bus_num != -1) { | ||
250 | struct i2c_adapter *adapter; | ||
251 | |||
252 | adapter = i2c_get_adapter(i2c_bus_num); | ||
253 | if (!adapter) { | ||
254 | dev_err(&pdev->dev, | ||
255 | "Failed to get I2C adapter, bus %d\n", | ||
256 | i2c_bus_num); | ||
257 | return -EPROBE_DEFER; | ||
258 | } | ||
259 | |||
260 | ddata->i2c_adapter = adapter; | ||
261 | } | ||
262 | |||
263 | in = omap_dss_find_output(pdata->source); | ||
264 | if (in == NULL) { | ||
265 | i2c_put_adapter(ddata->i2c_adapter); | ||
266 | |||
267 | dev_err(&pdev->dev, "Failed to find video source\n"); | ||
268 | return -EPROBE_DEFER; | ||
269 | } | ||
270 | |||
271 | ddata->in = in; | ||
272 | |||
273 | dssdev = &ddata->dssdev; | ||
274 | dssdev->name = pdata->name; | ||
275 | |||
276 | return 0; | ||
277 | } | ||
278 | |||
279 | static int dvic_probe_of(struct platform_device *pdev) | 238 | static int dvic_probe_of(struct platform_device *pdev) |
280 | { | 239 | { |
281 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); | 240 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); |
@@ -313,23 +272,18 @@ static int dvic_probe(struct platform_device *pdev) | |||
313 | struct omap_dss_device *dssdev; | 272 | struct omap_dss_device *dssdev; |
314 | int r; | 273 | int r; |
315 | 274 | ||
275 | if (!pdev->dev.of_node) | ||
276 | return -ENODEV; | ||
277 | |||
316 | ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); | 278 | ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); |
317 | if (!ddata) | 279 | if (!ddata) |
318 | return -ENOMEM; | 280 | return -ENOMEM; |
319 | 281 | ||
320 | platform_set_drvdata(pdev, ddata); | 282 | platform_set_drvdata(pdev, ddata); |
321 | 283 | ||
322 | if (dev_get_platdata(&pdev->dev)) { | 284 | r = dvic_probe_of(pdev); |
323 | r = dvic_probe_pdata(pdev); | 285 | if (r) |
324 | if (r) | 286 | return r; |
325 | return r; | ||
326 | } else if (pdev->dev.of_node) { | ||
327 | r = dvic_probe_of(pdev); | ||
328 | if (r) | ||
329 | return r; | ||
330 | } else { | ||
331 | return -ENODEV; | ||
332 | } | ||
333 | 287 | ||
334 | ddata->timings = dvic_default_timings; | 288 | ddata->timings = dvic_default_timings; |
335 | 289 | ||
diff --git a/include/video/omap-panel-data.h b/include/video/omap-panel-data.h index c0836b118f67..4d0b8832ae11 100644 --- a/include/video/omap-panel-data.h +++ b/include/video/omap-panel-data.h | |||
@@ -47,18 +47,6 @@ struct encoder_tfp410_platform_data { | |||
47 | 47 | ||
48 | 48 | ||
49 | /** | 49 | /** |
50 | * connector_dvi platform data | ||
51 | * @name: name for this display entity | ||
52 | * @source: name of the display entity used as a video source | ||
53 | * @i2c_bus_num: i2c bus number to be used for reading EDID | ||
54 | */ | ||
55 | struct connector_dvi_platform_data { | ||
56 | const char *name; | ||
57 | const char *source; | ||
58 | int i2c_bus_num; | ||
59 | }; | ||
60 | |||
61 | /** | ||
62 | * connector_atv platform data | 50 | * connector_atv platform data |
63 | * @name: name for this display entity | 51 | * @name: name for this display entity |
64 | * @source: name of the display entity used as a video source | 52 | * @source: name of the display entity used as a video source |