aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/display.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2/dss/display.c')
-rw-r--r--drivers/video/omap2/dss/display.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 3b92b84b9560..3f345b8cbcb0 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -591,10 +591,6 @@ struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from)
591 591
592 int match(struct device *dev, void *data) 592 int match(struct device *dev, void *data)
593 { 593 {
594 /* skip panels connected to controllers */
595 if (to_dss_device(dev)->panel.ctrl)
596 return 0;
597
598 return 1; 594 return 1;
599 } 595 }
600 596
@@ -626,45 +622,21 @@ EXPORT_SYMBOL(omap_dss_find_device);
626 622
627int omap_dss_start_device(struct omap_dss_device *dssdev) 623int omap_dss_start_device(struct omap_dss_device *dssdev)
628{ 624{
629 int r;
630
631 if (!dssdev->driver) { 625 if (!dssdev->driver) {
632 DSSDBG("no driver\n"); 626 DSSDBG("no driver\n");
633 r = -ENODEV; 627 return -ENODEV;
634 goto err0;
635 }
636
637 if (dssdev->ctrl.panel && !dssdev->ctrl.panel->driver) {
638 DSSDBG("no panel driver\n");
639 r = -ENODEV;
640 goto err0;
641 } 628 }
642 629
643 if (!try_module_get(dssdev->dev.driver->owner)) { 630 if (!try_module_get(dssdev->dev.driver->owner)) {
644 r = -ENODEV; 631 return -ENODEV;
645 goto err0;
646 }
647
648 if (dssdev->ctrl.panel) {
649 if (!try_module_get(dssdev->ctrl.panel->dev.driver->owner)) {
650 r = -ENODEV;
651 goto err1;
652 }
653 } 632 }
654 633
655 return 0; 634 return 0;
656err1:
657 module_put(dssdev->dev.driver->owner);
658err0:
659 return r;
660} 635}
661EXPORT_SYMBOL(omap_dss_start_device); 636EXPORT_SYMBOL(omap_dss_start_device);
662 637
663void omap_dss_stop_device(struct omap_dss_device *dssdev) 638void omap_dss_stop_device(struct omap_dss_device *dssdev)
664{ 639{
665 if (dssdev->ctrl.panel)
666 module_put(dssdev->ctrl.panel->dev.driver->owner);
667
668 module_put(dssdev->dev.driver->owner); 640 module_put(dssdev->dev.driver->owner);
669} 641}
670EXPORT_SYMBOL(omap_dss_stop_device); 642EXPORT_SYMBOL(omap_dss_stop_device);