Skip to content

Commit 1d0811b

Browse files
committed
parisc/stifb: Fix fb_is_primary_device() only available with CONFIG_FB_STI
Fix this build error noticed by the kernel test robot: drivers/video/console/sticore.c:1132:5: error: redefinition of 'fb_is_primary_device' arch/parisc/include/asm/fb.h:18:19: note: previous definition of 'fb_is_primary_device' Signed-off-by: Helge Deller <[email protected]> Reported-by: kernel test robot <[email protected]> Cc: [email protected] # v5.10+
1 parent f2906aa commit 1d0811b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

arch/parisc/include/asm/fb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
1212
pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
1313
}
1414

15-
#if defined(CONFIG_STI_CONSOLE) || defined(CONFIG_FB_STI)
15+
#if defined(CONFIG_FB_STI)
1616
int fb_is_primary_device(struct fb_info *info);
1717
#else
1818
static inline int fb_is_primary_device(struct fb_info *info)

drivers/video/console/sticore.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,7 @@ int sti_call(const struct sti_struct *sti, unsigned long func,
11481148
return ret;
11491149
}
11501150

1151+
#if defined(CONFIG_FB_STI)
11511152
/* check if given fb_info is the primary device */
11521153
int fb_is_primary_device(struct fb_info *info)
11531154
{
@@ -1163,6 +1164,7 @@ int fb_is_primary_device(struct fb_info *info)
11631164
return (sti->info == info);
11641165
}
11651166
EXPORT_SYMBOL(fb_is_primary_device);
1167+
#endif
11661168

11671169
MODULE_AUTHOR("Philipp Rumpf, Helge Deller, Thomas Bogendoerfer");
11681170
MODULE_DESCRIPTION("Core STI driver for HP's NGLE series graphics cards in HP PARISC machines");

0 commit comments

Comments
 (0)