Skip to content

Commit ce6eacb

Browse files
Bruno Prémontbjorn-helgaas
authored andcommitted
vgaarb: Drop obsolete #ifndef
Commit 20cde69 ("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: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Matthew Garrett <matthew.garrett@nebula.com>
1 parent 86fd887 commit ce6eacb

2 files changed

Lines changed: 0 additions & 10 deletions

File tree

‎drivers/gpu/vga/vgaarb.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,8 @@ static int vga_str_to_iostate(char *buf, int str_size, int *io_state)
113113
return 1;
114114
}
115115

116-
#ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE
117116
/* this is only used a cookie - it should not be dereferenced */
118117
static struct pci_dev *vga_default;
119-
#endif
120118

121119
static void vga_arb_device_card_gone(struct pci_dev *pdev);
122120

@@ -132,7 +130,6 @@ static struct vga_device *vgadev_find(struct pci_dev *pdev)
132130
}
133131

134132
/* Returns the default VGA device (vgacon's babe) */
135-
#ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE
136133
struct pci_dev *vga_default_device(void)
137134
{
138135
return vga_default;
@@ -148,7 +145,6 @@ void vga_set_default_device(struct pci_dev *pdev)
148145
pci_dev_put(vga_default);
149146
vga_default = pci_dev_get(pdev);
150147
}
151-
#endif
152148

153149
static inline void vga_irq_set_state(struct vga_device *vgadev, bool state)
154150
{
@@ -584,14 +580,12 @@ static bool vga_arbiter_add_pci_device(struct pci_dev *pdev)
584580
/* Deal with VGA default device. Use first enabled one
585581
* by default if arch doesn't have it's own hook
586582
*/
587-
#ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE
588583
if (vga_default == NULL &&
589584
((vgadev->owns & VGA_RSRC_LEGACY_MASK) == VGA_RSRC_LEGACY_MASK)) {
590585
pr_info("vgaarb: setting as boot device: PCI:%s\n",
591586
pci_name(pdev));
592587
vga_set_default_device(pdev);
593588
}
594-
#endif
595589

596590
vga_arbiter_check_bridge_sharing(vgadev);
597591

@@ -625,10 +619,8 @@ static bool vga_arbiter_del_pci_device(struct pci_dev *pdev)
625619
goto bail;
626620
}
627621

628-
#ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE
629622
if (vga_default == pdev)
630623
vga_set_default_device(NULL);
631-
#endif
632624

633625
if (vgadev->decodes & (VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM))
634626
vga_decode_count--;

‎include/linux/vgaarb.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,13 @@ extern void vga_put(struct pci_dev *pdev, unsigned int rsrc);
182182
* vga_get()...
183183
*/
184184

185-
#ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE
186185
#ifdef CONFIG_VGA_ARB
187186
extern struct pci_dev *vga_default_device(void);
188187
extern void vga_set_default_device(struct pci_dev *pdev);
189188
#else
190189
static inline struct pci_dev *vga_default_device(void) { return NULL; };
191190
static inline void vga_set_default_device(struct pci_dev *pdev) { };
192191
#endif
193-
#endif
194192

195193
/**
196194
* vga_conflicts

0 commit comments

Comments
 (0)