Skip to content

Commit

Permalink
vgaarb: Wrap vga_(get|put) in CONFIG_VGA_ARB
Browse files Browse the repository at this point in the history
Fix link failure without the vga arbitrator.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Chris Wilson authored and Dave Airlie committed Aug 26, 2010
1 parent 30f4437 commit 04cbe1d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions include/linux/vgaarb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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


/**
Expand Down

0 comments on commit 04cbe1d

Please sign in to comment.