Skip to content

Commit

Permalink
parisc/stifb: Fix fb_is_primary_device() only available with CONFIG_F…
Browse files Browse the repository at this point in the history
…B_STI

commit 1d0811b upstream.

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+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
hdeller authored and gregkh committed Jun 29, 2022
1 parent af0ff2d commit a1c9023
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arch/parisc/include/asm/fb.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
}

#if defined(CONFIG_STI_CONSOLE) || defined(CONFIG_FB_STI)
#if defined(CONFIG_FB_STI)
int fb_is_primary_device(struct fb_info *info);
#else
static inline int fb_is_primary_device(struct fb_info *info)
Expand Down
2 changes: 2 additions & 0 deletions drivers/video/console/sticore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,7 @@ int sti_call(const struct sti_struct *sti, unsigned long func,
return ret;
}

#if defined(CONFIG_FB_STI)
/* check if given fb_info is the primary device */
int fb_is_primary_device(struct fb_info *info)
{
Expand All @@ -1142,6 +1143,7 @@ int fb_is_primary_device(struct fb_info *info)
return (sti->info == info);
}
EXPORT_SYMBOL(fb_is_primary_device);
#endif

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

0 comments on commit a1c9023

Please sign in to comment.