提交 ce6eacb0 编写于 作者: B Bruno Prémont 提交者: Bjorn Helgaas

vgaarb: Drop obsolete #ifndef

Commit 20cde694 ("x86, ia64: Move EFI_FB vga_default_device()
initialization to pci_vga_fixup()") moved boot video device detection from
efifb to x86 and ia64 pci/fixup.c.

Remove the left-over #ifndef check that will always match since the
corresponding arch-specific define is gone with above patch.
Signed-off-by: NBruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
CC: Matthew Garrett <matthew.garrett@nebula.com>
上级 86fd887b
...@@ -113,10 +113,8 @@ static int vga_str_to_iostate(char *buf, int str_size, int *io_state) ...@@ -113,10 +113,8 @@ static int vga_str_to_iostate(char *buf, int str_size, int *io_state)
return 1; return 1;
} }
#ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE
/* this is only used a cookie - it should not be dereferenced */ /* this is only used a cookie - it should not be dereferenced */
static struct pci_dev *vga_default; static struct pci_dev *vga_default;
#endif
static void vga_arb_device_card_gone(struct pci_dev *pdev); static void vga_arb_device_card_gone(struct pci_dev *pdev);
...@@ -132,7 +130,6 @@ static struct vga_device *vgadev_find(struct pci_dev *pdev) ...@@ -132,7 +130,6 @@ static struct vga_device *vgadev_find(struct pci_dev *pdev)
} }
/* Returns the default VGA device (vgacon's babe) */ /* Returns the default VGA device (vgacon's babe) */
#ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE
struct pci_dev *vga_default_device(void) struct pci_dev *vga_default_device(void)
{ {
return vga_default; return vga_default;
...@@ -148,7 +145,6 @@ void vga_set_default_device(struct pci_dev *pdev) ...@@ -148,7 +145,6 @@ void vga_set_default_device(struct pci_dev *pdev)
pci_dev_put(vga_default); pci_dev_put(vga_default);
vga_default = pci_dev_get(pdev); vga_default = pci_dev_get(pdev);
} }
#endif
static inline void vga_irq_set_state(struct vga_device *vgadev, bool state) static inline void vga_irq_set_state(struct vga_device *vgadev, bool state)
{ {
...@@ -584,14 +580,12 @@ static bool vga_arbiter_add_pci_device(struct pci_dev *pdev) ...@@ -584,14 +580,12 @@ static bool vga_arbiter_add_pci_device(struct pci_dev *pdev)
/* Deal with VGA default device. Use first enabled one /* Deal with VGA default device. Use first enabled one
* by default if arch doesn't have it's own hook * by default if arch doesn't have it's own hook
*/ */
#ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE
if (vga_default == NULL && if (vga_default == NULL &&
((vgadev->owns & VGA_RSRC_LEGACY_MASK) == VGA_RSRC_LEGACY_MASK)) { ((vgadev->owns & VGA_RSRC_LEGACY_MASK) == VGA_RSRC_LEGACY_MASK)) {
pr_info("vgaarb: setting as boot device: PCI:%s\n", pr_info("vgaarb: setting as boot device: PCI:%s\n",
pci_name(pdev)); pci_name(pdev));
vga_set_default_device(pdev); vga_set_default_device(pdev);
} }
#endif
vga_arbiter_check_bridge_sharing(vgadev); vga_arbiter_check_bridge_sharing(vgadev);
...@@ -625,10 +619,8 @@ static bool vga_arbiter_del_pci_device(struct pci_dev *pdev) ...@@ -625,10 +619,8 @@ static bool vga_arbiter_del_pci_device(struct pci_dev *pdev)
goto bail; goto bail;
} }
#ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE
if (vga_default == pdev) if (vga_default == pdev)
vga_set_default_device(NULL); vga_set_default_device(NULL);
#endif
if (vgadev->decodes & (VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM)) if (vgadev->decodes & (VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM))
vga_decode_count--; vga_decode_count--;
......
...@@ -182,7 +182,6 @@ extern void vga_put(struct pci_dev *pdev, unsigned int rsrc); ...@@ -182,7 +182,6 @@ extern void vga_put(struct pci_dev *pdev, unsigned int rsrc);
* vga_get()... * vga_get()...
*/ */
#ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE
#ifdef CONFIG_VGA_ARB #ifdef CONFIG_VGA_ARB
extern struct pci_dev *vga_default_device(void); extern struct pci_dev *vga_default_device(void);
extern void vga_set_default_device(struct pci_dev *pdev); extern void vga_set_default_device(struct pci_dev *pdev);
...@@ -190,7 +189,6 @@ extern void vga_set_default_device(struct pci_dev *pdev); ...@@ -190,7 +189,6 @@ extern void vga_set_default_device(struct pci_dev *pdev);
static inline struct pci_dev *vga_default_device(void) { return NULL; }; static inline struct pci_dev *vga_default_device(void) { return NULL; };
static inline void vga_set_default_device(struct pci_dev *pdev) { }; static inline void vga_set_default_device(struct pci_dev *pdev) { };
#endif #endif
#endif
/** /**
* vga_conflicts * vga_conflicts
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册