From 0ea14521aeb608486ff9e7c0c498ad666faabcb7 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 19 Aug 2010 21:29:43 +0100 Subject: [PATCH] --- yaml --- r: 210084 b: refs/heads/master c: 04cbe1de6fbda9649a6f25666194e6955d3e717e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/vgaarb.h | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 7acc1367e4b9..158b325ee14b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 30f4437202daa5315a1033b2084ddce96fea99b6 +refs/heads/master: 04cbe1de6fbda9649a6f25666194e6955d3e717e diff --git a/trunk/include/linux/vgaarb.h b/trunk/include/linux/vgaarb.h index 6228b5b77d35..e9e1524b582c 100644 --- a/trunk/include/linux/vgaarb.h +++ b/trunk/include/linux/vgaarb.h @@ -93,8 +93,11 @@ extern void vga_set_legacy_decoding(struct pci_dev *pdev, * Nested calls are supported (a per-resource counter is maintained) */ -extern int vga_get(struct pci_dev *pdev, unsigned int rsrc, - int interruptible); +#if defined(CONFIG_VGA_ARB) +extern int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible); +#else +static inline int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible) { return 0; } +#endif /** * vga_get_interruptible @@ -131,7 +134,11 @@ static inline int vga_get_uninterruptible(struct pci_dev *pdev, * are already locked by another card. It can be called in any context */ +#if defined(CONFIG_VGA_ARB) extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc); +#else +static inline int vga_tryget(struct pci_dev *pdev, unsigned int rsrc) { return 0; } +#endif /** * vga_put - release lock on legacy VGA resources @@ -146,7 +153,11 @@ extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc); * released if the counter reaches 0. */ +#if defined(CONFIG_VGA_ARB) extern void vga_put(struct pci_dev *pdev, unsigned int rsrc); +#else +#define vga_put(pdev, rsrc) +#endif /**