Merge tag 'mtd/for-5.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mtd...
[sfrench/cifs-2.6.git] / drivers / media / media-entity.c
index 0b1cb3559140a1fee04af77890f8dd1131b0f484..a998a2e0ea1dc93c37ca5f30baf749940056eb7d 100644 (file)
@@ -17,7 +17,6 @@
  */
 
 #include <linux/bitmap.h>
-#include <linux/module.h>
 #include <linux/property.h>
 #include <linux/slab.h>
 #include <media/media-entity.h>
@@ -436,7 +435,10 @@ __must_check int __media_pipeline_start(struct media_entity *entity,
 
                entity->stream_count++;
 
-               if (WARN_ON(entity->pipe && entity->pipe != pipe)) {
+               if (entity->pipe && entity->pipe != pipe) {
+                       pr_err("Pipe active for %s. Can't start for %s\n",
+                               entity->name,
+                               entity_err->name);
                        ret = -EBUSY;
                        goto error;
                }
@@ -587,33 +589,6 @@ void media_pipeline_stop(struct media_entity *entity)
 }
 EXPORT_SYMBOL_GPL(media_pipeline_stop);
 
-/* -----------------------------------------------------------------------------
- * Module use count
- */
-
-struct media_entity *media_entity_get(struct media_entity *entity)
-{
-       if (entity == NULL)
-               return NULL;
-
-       if (entity->graph_obj.mdev->dev &&
-           !try_module_get(entity->graph_obj.mdev->dev->driver->owner))
-               return NULL;
-
-       return entity;
-}
-EXPORT_SYMBOL_GPL(media_entity_get);
-
-void media_entity_put(struct media_entity *entity)
-{
-       if (entity == NULL)
-               return;
-
-       if (entity->graph_obj.mdev->dev)
-               module_put(entity->graph_obj.mdev->dev->driver->owner);
-}
-EXPORT_SYMBOL_GPL(media_entity_put);
-
 /* -----------------------------------------------------------------------------
  * Links management
  */