提交 492b183b 编写于 作者: A Arnd Bergmann 提交者: Mauro Carvalho Chehab

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: 6795bf62 ("media: ngene: convert kernellog printing from printk() to dev_*() macros")
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Acked-by: NDaniel Scheller <d.scheller@gmx.net>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 9fbc5a32
...@@ -1325,7 +1325,6 @@ static int ngene_buffer_config(struct ngene *dev) ...@@ -1325,7 +1325,6 @@ static int ngene_buffer_config(struct ngene *dev)
static int ngene_start(struct ngene *dev) static int ngene_start(struct ngene *dev)
{ {
struct device *pdev = &dev->pci_dev->dev;
int stat; int stat;
int i; int i;
...@@ -1359,6 +1358,7 @@ static int ngene_start(struct ngene *dev) ...@@ -1359,6 +1358,7 @@ static int ngene_start(struct ngene *dev)
#ifdef CONFIG_PCI_MSI #ifdef CONFIG_PCI_MSI
/* enable MSI if kernel and card support it */ /* enable MSI if kernel and card support it */
if (pci_msi_enabled() && dev->card_info->msi_supported) { if (pci_msi_enabled() && dev->card_info->msi_supported) {
struct device *pdev = &dev->pci_dev->dev;
unsigned long flags; unsigned long flags;
ngwritel(0, NGENE_INT_ENABLE); ngwritel(0, NGENE_INT_ENABLE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册