All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] media: au0828 fix compile warns
@ 2016-01-19 18:33 Shuah Khan
  2016-01-19 18:33 ` [PATCH 1/2] media: au0828 fix enable/disable source " Shuah Khan
  2016-01-19 18:33 ` [PATCH 2/2] media: au0828 fix au0828_media_device_register warn Shuah Khan
  0 siblings, 2 replies; 3+ messages in thread
From: Shuah Khan @ 2016-01-19 18:33 UTC (permalink / raw)
  To: mchehab, hans.verkuil, chehabrafael, javier
  Cc: Shuah Khan, linux-media, linux-kernel

Fix compile warns for the MEDIA_CONTROLLER disabled
case introduced in the patch series for Sharing media
resources across ALSA and au0828 drivers:

https://lkml.org/lkml/2016/1/6/668

Shuah Khan (2):
  media: au0828 fix enable/disable source compile warns
  media: au0828 fix au0828_media_device_register warn

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

-- 
2.5.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] media: au0828 fix enable/disable source compile warns
  2016-01-19 18:33 [PATCH 0/2] media: au0828 fix compile warns Shuah Khan
@ 2016-01-19 18:33 ` Shuah Khan
  2016-01-19 18:33 ` [PATCH 2/2] media: au0828 fix au0828_media_device_register warn Shuah Khan
  1 sibling, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2016-01-19 18:33 UTC (permalink / raw)
  To: mchehab, hans.verkuil, chehabrafael, javier
  Cc: Shuah Khan, linux-media, linux-kernel

Fix the following compile warns for MEDIA_CONTROLLER
disabled case.

 CC [M]  drivers/media/usb/au0828/au0828-core.o
drivers/media/usb/au0828/au0828-core.c:398:12: warning: ‘au0828_enable_source’ defined but not used [-Wunused-function]
 static int au0828_enable_source(struct media_entity *entity,
            ^
drivers/media/usb/au0828/au0828-core.c:497:13: warning: ‘au0828_disable_source’ defined but not used [-Wunused-function]
 static void au0828_disable_source(struct media_entity *entity)
             ^

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 drivers/media/usb/au0828/au0828-core.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
index de357a2..7dda0dd 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
@@ -395,10 +395,10 @@ void au0828_create_media_graph_notify(struct media_entity *new,
 #endif
 }
 
+#ifdef CONFIG_MEDIA_CONTROLLER
 static int au0828_enable_source(struct media_entity *entity,
 				struct media_pipeline *pipe)
 {
-#ifdef CONFIG_MEDIA_CONTROLLER
 	struct media_entity  *source;
 	struct media_entity *sink;
 	struct media_link *link, *found_link = NULL;
@@ -490,13 +490,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
 	struct media_entity *sink;
 	int ret = 0;
 	struct media_device *mdev = entity->graph_obj.mdev;
@@ -536,8 +533,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)
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] media: au0828 fix au0828_media_device_register warn
  2016-01-19 18:33 [PATCH 0/2] media: au0828 fix compile warns Shuah Khan
  2016-01-19 18:33 ` [PATCH 1/2] media: au0828 fix enable/disable source " Shuah Khan
@ 2016-01-19 18:33 ` Shuah Khan
  1 sibling, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2016-01-19 18:33 UTC (permalink / raw)
  To: mchehab, hans.verkuil, chehabrafael, javier
  Cc: Shuah Khan, linux-media, linux-kernel

Fix the following compile warns for MEDIA_CONTROLLER
disabled case.

drivers/media/usb/au0828/au0828-core.c:539:12: warning: ‘au0828_media_device_register’ defined but not used [-Wunused-function]
 static int au0828_media_device_register(struct au0828_dev *dev,

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 drivers/media/usb/au0828/au0828-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
index 7dda0dd..d25f7ac 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
@@ -536,10 +536,10 @@ end:
 }
 #endif
 
+#ifdef CONFIG_MEDIA_CONTROLLER
 static int au0828_media_device_register(struct au0828_dev *dev,
 					struct usb_device *udev)
 {
-#ifdef CONFIG_MEDIA_CONTROLLER
 	int ret;
 
 	if (!dev->media_dev)
@@ -570,9 +570,9 @@ static int au0828_media_device_register(struct au0828_dev *dev,
 	dev->media_dev->source_priv = (void *) dev;
 	dev->media_dev->enable_source = au0828_enable_source;
 	dev->media_dev->disable_source = au0828_disable_source;
-#endif
 	return 0;
 }
+#endif
 
 static int au0828_usb_probe(struct usb_interface *interface,
 	const struct usb_device_id *id)
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-19 18:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-19 18:33 [PATCH 0/2] media: au0828 fix compile warns Shuah Khan
2016-01-19 18:33 ` [PATCH 1/2] media: au0828 fix enable/disable source " Shuah Khan
2016-01-19 18:33 ` [PATCH 2/2] media: au0828 fix au0828_media_device_register warn Shuah Khan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.