diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-03-13 16:06:03 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-03-22 13:17:40 +0300 |
commit | 492b183bd7bcaede57381f4d06e19f1983083781 (patch) | |
tree | 97df78af5ee51d563a27ac5026c1fb33b60626ff /drivers/media | |
parent | 9fbc5a3245f8b32ef941e39597ba7b5e15b07376 (diff) | |
download | linux-492b183bd7bcaede57381f4d06e19f1983083781.tar.xz |
media: ngene: avoid unused variable warning
The newly added pdev variable is only used in an #ifdef, causing a
build warning without CONFIG_PCI_MSI, unless we move the declaration
inside the same #ifdef:
drivers/media/pci/ngene/ngene-core.c: In function 'ngene_start':
drivers/media/pci/ngene/ngene-core.c:1328:17: error: unused variable 'pdev' [-Werror=unused-variable]
Fixes: 6795bf626482 ("media: ngene: convert kernellog printing from printk() to dev_*() macros")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/pci/ngene/ngene-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/pci/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c index 3b9a1bfaf6c0..25f16833a475 100644 --- a/drivers/media/pci/ngene/ngene-core.c +++ b/drivers/media/pci/ngene/ngene-core.c @@ -1325,7 +1325,6 @@ static int ngene_buffer_config(struct ngene *dev) static int ngene_start(struct ngene *dev) { - struct device *pdev = &dev->pci_dev->dev; int stat; int i; @@ -1359,6 +1358,7 @@ static int ngene_start(struct ngene *dev) #ifdef CONFIG_PCI_MSI /* enable MSI if kernel and card support it */ if (pci_msi_enabled() && dev->card_info->msi_supported) { + struct device *pdev = &dev->pci_dev->dev; unsigned long flags; ngwritel(0, NGENE_INT_ENABLE); |