[PATCH] fix warnings from vgaarb.h

From: Meelis Roos
Date: Wed Apr 04 2012 - 02:20:25 EST


in 3.4-rc1-144, I get the following warnings. Fix them by including
<linux/pci.h> to get struct pci_dev.

CC [M] drivers/gpu/drm/i915/intel_display.o
In file included from drivers/gpu/drm/i915/intel_display.c:33:0:
include/linux/vgaarb.h:66:9: warning: ʽstruct pci_devʼ declared inside parameter list [enabled by default]
include/linux/vgaarb.h:66:9: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
include/linux/vgaarb.h:97:27: warning: ʽstruct pci_devʼ declared inside parameter list [enabled by default]
include/linux/vgaarb.h:109:6: warning: ʽstruct pci_devʼ declared inside parameter list [enabled by default]
include/linux/vgaarb.h: In function ʽvga_get_interruptibleʼ:
include/linux/vgaarb.h:111:8: warning: passing argument 1 of ʽvga_getʼ from incompatible pointer type [enabled by default]
include/linux/vgaarb.h:97:12: note: expected ʽstruct pci_dev *ʼ but argument is of type ʽstruct pci_dev *ʼ
include/linux/vgaarb.h: At top level:
include/linux/vgaarb.h:121:8: warning: ʽstruct pci_devʼ declared inside parameter list [enabled by default]
include/linux/vgaarb.h: In function ʽvga_get_uninterruptibleʼ:
include/linux/vgaarb.h:123:8: warning: passing argument 1 of ʽvga_getʼ from incompatible pointer type [enabled by default]
include/linux/vgaarb.h:97:12: note: expected ʽstruct pci_dev *ʼ but argument is of type ʽstruct pci_dev *ʼ
include/linux/vgaarb.h: At top level:
include/linux/vgaarb.h:138:30: warning: ʽstruct pci_devʼ declared inside parameter list [enabled by default]
include/linux/vgaarb.h:157:28: warning: ʽstruct pci_devʼ declared inside parameter list [enabled by default]
drivers/gpu/drm/i915/intel_display.c: In function ʽi915_disable_vgaʼ:
drivers/gpu/drm/i915/intel_display.c:9127:2: warning: passing argument 1 of ʽvga_get_uninterruptibleʼ from incompatible pointer type [enabled by default]
include/linux/vgaarb.h:120:19: note: expected ʽstruct pci_dev *ʼ but argument is of type ʽstruct pci_dev *ʼ
drivers/gpu/drm/i915/intel_display.c:9131:2: warning: passing argument 1 of ʽvga_putʼ from incompatible pointer type [enabled by default]
include/linux/vgaarb.h:157:13: note: expected ʽstruct pci_dev *ʼ but argument is of type ʽstruct pci_dev *ʼ

Signed-off-by: Meelis Roos <mroos@xxxxxxxx>

diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h
index 9c3120d..c23ba57 100644
--- a/include/linux/vgaarb.h
+++ b/include/linux/vgaarb.h
@@ -31,6 +31,7 @@
#ifndef LINUX_VGA_H
#define LINUX_VGA_H

+#include <linux/pci.h>

/* Legacy VGA regions */
#define VGA_RSRC_NONE 0x00

--
Meelis Roos (mroos@xxxxxxxx)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/