mutex_unlock(&omapdss_devices_lock);
}
+static bool omapdss_device_is_registered(struct device_node *node)
+{
+ struct omap_dss_device *dssdev;
+ bool found = false;
+
+ mutex_lock(&omapdss_devices_lock);
+
+ list_for_each_entry(dssdev, &omapdss_devices_list, list) {
+ if (dssdev->dev->of_node == node) {
+ found = true;
+ break;
+ }
+ }
+
+ mutex_unlock(&omapdss_devices_lock);
+ return found;
+}
+
/* -----------------------------------------------------------------------------
* Components Handling
*/
{
if (comp->dss_core_component)
return true;
- if (omapdss_component_is_display(comp->node))
- return true;
- if (omapdss_component_is_output(comp->node))
+ if (omapdss_device_is_registered(comp->node))
return true;
return false;
}
EXPORT_SYMBOL(omapdss_unregister_display);
-bool omapdss_component_is_display(struct device_node *node)
-{
- struct omap_dss_device *dssdev;
- bool found = false;
-
- mutex_lock(&panel_list_mutex);
- list_for_each_entry(dssdev, &panel_list, panel_list) {
- if (dssdev->dev->of_node == node) {
- found = true;
- goto out;
- }
- }
-out:
- mutex_unlock(&panel_list_mutex);
- return found;
-}
-EXPORT_SYMBOL(omapdss_component_is_display);
-
struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev)
{
if (!try_module_get(dssdev->owner))
struct dispc_device *dispc_get_dispc(struct dss_device *dss);
const struct dispc_ops *dispc_get_ops(struct dss_device *dss);
-bool omapdss_component_is_display(struct device_node *node);
-bool omapdss_component_is_output(struct device_node *node);
-
bool omapdss_stack_is_ready(void);
void omapdss_gather_components(struct device *dev);
}
EXPORT_SYMBOL(omapdss_unregister_output);
-bool omapdss_component_is_output(struct device_node *node)
-{
- struct omap_dss_device *out;
-
- list_for_each_entry(out, &output_list, output_list) {
- if (out->dev->of_node == node)
- return true;
- }
-
- return false;
-}
-EXPORT_SYMBOL(omapdss_component_is_output);
-
struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id)
{
struct omap_dss_device *out;