This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/media_tree.git tree:

Subject: [media] hide unused functions for !MEDIA_CONTROLLER
Author:  Arnd Bergmann <[email protected]>
Date:    Fri Mar 4 21:06:43 2016 -0300

Some functions in the au0828 driver are only used when CONFIG_MEDIA_CONTROLLER
is enabled, and otherwise defined as empty functions:

media/usb/au0828/au0828-core.c:208:13: error: 'au0828_media_graph_notify' 
defined but not used [-Werror=unused-function]
media/usb/au0828/au0828-core.c:262:12: error: 'au0828_enable_source' defined 
but not used [-Werror=unused-function]
media/usb/au0828/au0828-core.c:412:13: error: 'au0828_disable_source' defined 
but not used [-Werror=unused-function]

This moves the #ifdef so the entire definitions are hidden in this case.

[[email protected]: As pointed by Shuah Khan, a return 0 can be removed]

Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/usb/au0828/au0828-core.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=0a82edd011f5cd3de1eded8fe1d78cef370b2083
diff --git a/drivers/media/usb/au0828/au0828-core.c 
b/drivers/media/usb/au0828/au0828-core.c
index 4ffaa3b2e905..7fc3dba5e2b6 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
@@ -205,10 +205,10 @@ static int au0828_media_device_init(struct au0828_dev 
*dev,
        return 0;
 }
 
+#ifdef CONFIG_MEDIA_CONTROLLER
 static void au0828_media_graph_notify(struct media_entity *new,
                                      void *notify_data)
 {
-#ifdef CONFIG_MEDIA_CONTROLLER
        struct au0828_dev *dev = (struct au0828_dev *) notify_data;
        int ret;
        struct media_entity *entity, *mixer = NULL, *decoder = NULL;
@@ -256,13 +256,11 @@ create_link:
                        dev_err(&dev->usbdev->dev,
                                "Mixer Pad Link Create Error: %d\n", ret);
        }
-#endif
 }
 
 static int au0828_enable_source(struct media_entity *entity,
                                struct media_pipeline *pipe)
 {
-#ifdef CONFIG_MEDIA_CONTROLLER
        struct media_entity  *source, *find_source;
        struct media_entity *sink;
        struct media_link *link, *found_link = NULL;
@@ -405,13 +403,10 @@ end:
        pr_debug("au0828_enable_source() end %s %d %d\n",
                 entity->name, entity->function, ret);
        return ret;
-#endif
-       return 0;
 }
 
 static void au0828_disable_source(struct media_entity *entity)
 {
-#ifdef CONFIG_MEDIA_CONTROLLER
        int ret = 0;
        struct media_device *mdev = entity->graph_obj.mdev;
        struct au0828_dev *dev;
@@ -453,8 +448,8 @@ static void au0828_disable_source(struct media_entity 
*entity)
 
 end:
        mutex_unlock(&mdev->graph_mutex);
-#endif
 }
+#endif
 
 static int au0828_media_device_register(struct au0828_dev *dev,
                                        struct usb_device *udev)

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to