Commit 363bdb11 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mauro Carvalho Chehab

[media] saa7134: fix warning with !MEDIA_CONTROLLER

When CONFIG_MEDIA_CONTROLLER is disabled, we get a warning
about an unused function:

drivers/media/pci/saa7134/saa7134-core.c:832:13: error: 'saa7134_create_entities' defined but not used [-Werror=unused-function]

This moves the #ifdef outside of the function, as it is
never called here.

Fixes: ac90aa02 ("[media] saa7134: add media controller support")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 0d37ba62
...@@ -829,9 +829,9 @@ static void saa7134_media_release(struct saa7134_dev *dev) ...@@ -829,9 +829,9 @@ static void saa7134_media_release(struct saa7134_dev *dev)
#endif #endif
} }
#if defined(CONFIG_MEDIA_CONTROLLER)
static void saa7134_create_entities(struct saa7134_dev *dev) static void saa7134_create_entities(struct saa7134_dev *dev)
{ {
#if defined(CONFIG_MEDIA_CONTROLLER)
int ret, i; int ret, i;
struct media_entity *entity; struct media_entity *entity;
struct media_entity *decoder = NULL; struct media_entity *decoder = NULL;
...@@ -951,8 +951,8 @@ static void saa7134_create_entities(struct saa7134_dev *dev) ...@@ -951,8 +951,8 @@ static void saa7134_create_entities(struct saa7134_dev *dev)
if (ret < 0) if (ret < 0)
pr_err("failed to register input entity %d!\n", i); pr_err("failed to register input entity %d!\n", i);
} }
#endif
} }
#endif
static struct video_device *vdev_init(struct saa7134_dev *dev, static struct video_device *vdev_init(struct saa7134_dev *dev,
struct video_device *template, struct video_device *template,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment