From: Arnd Bergmann <arnd@arndb.de>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
"Shuah Khan" <shuahkh@osg.samsung.com>,
"Hans Verkuil" <hans.verkuil@cisco.com>,
"Rafael Lourenço de Lima Chehab" <chehabrafael@gmail.com>,
"Javier Martinez Canillas" <javier@osg.samsung.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] [media] hide unused functions for !MEDIA_CONTROLLER
Date: Sat, 5 Mar 2016 01:06:43 +0100 [thread overview]
Message-ID: <1457136410-2234001-1-git-send-email-arnd@arndb.de> (raw)
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.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/media/usb/au0828/au0828-core.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
index 4ffaa3b2e905..d312098720a8 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,11 @@ 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 +449,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.7.0
next reply other threads:[~2016-03-05 0:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-05 0:06 Arnd Bergmann [this message]
2016-03-05 0:34 ` Shuah Khan
2016-03-05 12:08 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457136410-2234001-1-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=chehabrafael@gmail.com \
--cc=hans.verkuil@cisco.com \
--cc=javier@osg.samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=shuahkh@osg.samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®