Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <deller@gmx.de>
Reported-by: kernel test robot <lkp@intel.com>
Cc: stable@vger.kernel.org # v5.10+

+3 -1
+1 -1
arch/parisc/include/asm/fb.h
··· 12 12 pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; 13 13 } 14 14 15 - #if defined(CONFIG_STI_CONSOLE) || defined(CONFIG_FB_STI) 15 + #if defined(CONFIG_FB_STI) 16 16 int fb_is_primary_device(struct fb_info *info); 17 17 #else 18 18 static inline int fb_is_primary_device(struct fb_info *info)
+2
drivers/video/console/sticore.c
··· 1148 1148 return ret; 1149 1149 } 1150 1150 1151 + #if defined(CONFIG_FB_STI) 1151 1152 /* check if given fb_info is the primary device */ 1152 1153 int fb_is_primary_device(struct fb_info *info) 1153 1154 { ··· 1164 1163 return (sti->info == info); 1165 1164 } 1166 1165 EXPORT_SYMBOL(fb_is_primary_device); 1166 + #endif 1167 1167 1168 1168 MODULE_AUTHOR("Philipp Rumpf, Helge Deller, Thomas Bogendoerfer"); 1169 1169 MODULE_DESCRIPTION("Core STI driver for HP's NGLE series graphics cards in HP PARISC machines");