As the call paths of the functions in question will change, move them
around in anticipation of that. No other changes.

Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com>
Acked-by: Hans Verkuil <hans.verk...@cisco.com>
---
 drivers/media/media-device.c | 56 ++++++++++++++++++++++----------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
index c79a9f5..0920c02 100644
--- a/drivers/media/media-device.c
+++ b/drivers/media/media-device.c
@@ -660,6 +660,34 @@ void media_device_unregister_entity(struct media_entity 
*entity)
 }
 EXPORT_SYMBOL_GPL(media_device_unregister_entity);
 
+int __must_check media_device_register_entity_notify(struct media_device *mdev,
+                                       struct media_entity_notify *nptr)
+{
+       mutex_lock(&mdev->graph_mutex);
+       list_add_tail(&nptr->list, &mdev->entity_notify);
+       mutex_unlock(&mdev->graph_mutex);
+       return 0;
+}
+EXPORT_SYMBOL_GPL(media_device_register_entity_notify);
+
+/*
+ * Note: Should be called with mdev->lock held.
+ */
+static void __media_device_unregister_entity_notify(struct media_device *mdev,
+                                       struct media_entity_notify *nptr)
+{
+       list_del(&nptr->list);
+}
+
+void media_device_unregister_entity_notify(struct media_device *mdev,
+                                       struct media_entity_notify *nptr)
+{
+       mutex_lock(&mdev->graph_mutex);
+       __media_device_unregister_entity_notify(mdev, nptr);
+       mutex_unlock(&mdev->graph_mutex);
+}
+EXPORT_SYMBOL_GPL(media_device_unregister_entity_notify);
+
 /**
  * media_device_init() - initialize a media device
  * @mdev:      The media device
@@ -743,34 +771,6 @@ int __must_check __media_device_register(struct 
media_device *mdev,
 }
 EXPORT_SYMBOL_GPL(__media_device_register);
 
-int __must_check media_device_register_entity_notify(struct media_device *mdev,
-                                       struct media_entity_notify *nptr)
-{
-       mutex_lock(&mdev->graph_mutex);
-       list_add_tail(&nptr->list, &mdev->entity_notify);
-       mutex_unlock(&mdev->graph_mutex);
-       return 0;
-}
-EXPORT_SYMBOL_GPL(media_device_register_entity_notify);
-
-/*
- * Note: Should be called with mdev->lock held.
- */
-static void __media_device_unregister_entity_notify(struct media_device *mdev,
-                                       struct media_entity_notify *nptr)
-{
-       list_del(&nptr->list);
-}
-
-void media_device_unregister_entity_notify(struct media_device *mdev,
-                                       struct media_entity_notify *nptr)
-{
-       mutex_lock(&mdev->graph_mutex);
-       __media_device_unregister_entity_notify(mdev, nptr);
-       mutex_unlock(&mdev->graph_mutex);
-}
-EXPORT_SYMBOL_GPL(media_device_unregister_entity_notify);
-
 void media_device_unregister(struct media_device *mdev)
 {
        struct media_entity *entity;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to