Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04cbe1de authored by Chris Wilson's avatar Chris Wilson Committed by Dave Airlie
Browse files

vgaarb: Wrap vga_(get|put) in CONFIG_VGA_ARB



Fix link failure without the vga arbitrator.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 30f44372
Loading
Loading
Loading
Loading
+13 −2
Original line number Original line Diff line number Diff line
@@ -93,8 +93,11 @@ extern void vga_set_legacy_decoding(struct pci_dev *pdev,
 *     Nested calls are supported (a per-resource counter is maintained)
 *     Nested calls are supported (a per-resource counter is maintained)
 */
 */


extern int vga_get(struct pci_dev *pdev, unsigned int rsrc,
#if defined(CONFIG_VGA_ARB)
											int interruptible);
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
 *     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
 *     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);
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
 *     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.
 *     released if the counter reaches 0.
 */
 */


#if defined(CONFIG_VGA_ARB)
extern void vga_put(struct pci_dev *pdev, unsigned int rsrc);
extern void vga_put(struct pci_dev *pdev, unsigned int rsrc);
#else
#define vga_put(pdev, rsrc)
#endif




/**
/**