aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-03-04 19:06:43 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-03-05 07:07:14 -0500
commit0a82edd011f5cd3de1eded8fe1d78cef370b2083 (patch)
tree9b79502209ae67d20d78f9d60370260d34b1fb9e /drivers/media
parent0899f62ff93f73860a23a4d4ac6921e3786b41d1 (diff)
[media] hide unused functions for !MEDIA_CONTROLLER
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. [mchehab@osg.samsung.com: As pointed by Shuah Khan, a return 0 can be removed] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/au0828/au0828-core.c9
1 files changed, 2 insertions, 7 deletions
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,
205 return 0; 205 return 0;
206} 206}
207 207
208#ifdef CONFIG_MEDIA_CONTROLLER
208static void au0828_media_graph_notify(struct media_entity *new, 209static void au0828_media_graph_notify(struct media_entity *new,
209 void *notify_data) 210 void *notify_data)
210{ 211{
211#ifdef CONFIG_MEDIA_CONTROLLER
212 struct au0828_dev *dev = (struct au0828_dev *) notify_data; 212 struct au0828_dev *dev = (struct au0828_dev *) notify_data;
213 int ret; 213 int ret;
214 struct media_entity *entity, *mixer = NULL, *decoder = NULL; 214 struct media_entity *entity, *mixer = NULL, *decoder = NULL;
@@ -256,13 +256,11 @@ create_link:
256 dev_err(&dev->usbdev->dev, 256 dev_err(&dev->usbdev->dev,
257 "Mixer Pad Link Create Error: %d\n", ret); 257 "Mixer Pad Link Create Error: %d\n", ret);
258 } 258 }
259#endif
260} 259}
261 260
262static int au0828_enable_source(struct media_entity *entity, 261static int au0828_enable_source(struct media_entity *entity,
263 struct media_pipeline *pipe) 262 struct media_pipeline *pipe)
264{ 263{
265#ifdef CONFIG_MEDIA_CONTROLLER
266 struct media_entity *source, *find_source; 264 struct media_entity *source, *find_source;
267 struct media_entity *sink; 265 struct media_entity *sink;
268 struct media_link *link, *found_link = NULL; 266 struct media_link *link, *found_link = NULL;
@@ -405,13 +403,10 @@ end:
405 pr_debug("au0828_enable_source() end %s %d %d\n", 403 pr_debug("au0828_enable_source() end %s %d %d\n",
406 entity->name, entity->function, ret); 404 entity->name, entity->function, ret);
407 return ret; 405 return ret;
408#endif
409 return 0;
410} 406}
411 407
412static void au0828_disable_source(struct media_entity *entity) 408static void au0828_disable_source(struct media_entity *entity)
413{ 409{
414#ifdef CONFIG_MEDIA_CONTROLLER
415 int ret = 0; 410 int ret = 0;
416 struct media_device *mdev = entity->graph_obj.mdev; 411 struct media_device *mdev = entity->graph_obj.mdev;
417 struct au0828_dev *dev; 412 struct au0828_dev *dev;
@@ -453,8 +448,8 @@ static void au0828_disable_source(struct media_entity *entity)
453 448
454end: 449end:
455 mutex_unlock(&mdev->graph_mutex); 450 mutex_unlock(&mdev->graph_mutex);
456#endif
457} 451}
452#endif
458 453
459static int au0828_media_device_register(struct au0828_dev *dev, 454static int au0828_media_device_register(struct au0828_dev *dev,
460 struct usb_device *udev) 455 struct usb_device *udev)