mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
Fix access to video_is_primary_device() when compiled without CONFIG_VIDEO
When compiled without CONFIG_VIDEO the architecture specific implementations of video_is_primary_device() include prototypes and assume that video-common.c will be linked. Guard against this so that the fallback inline implementation that returns false will be used when compiled without CONFIG_VIDEO. Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202506221312.49Fy1aNA-lkp@intel.com/ Link: https://lore.kernel.org/r/20250811162606.587759-2-superm1@kernel.org Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
This commit is contained in:
parent
7acbe30813
commit
6e490dea61
3 changed files with 5 additions and 1 deletions
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
struct device;
|
||||
|
||||
#if defined(CONFIG_STI_CORE)
|
||||
#if defined(CONFIG_STI_CORE) && defined(CONFIG_VIDEO)
|
||||
bool video_is_primary_device(struct device *dev);
|
||||
#define video_is_primary_device video_is_primary_device
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -19,8 +19,10 @@ static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
|
|||
#define pgprot_framebuffer pgprot_framebuffer
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VIDEO
|
||||
bool video_is_primary_device(struct device *dev);
|
||||
#define video_is_primary_device video_is_primary_device
|
||||
#endif
|
||||
|
||||
static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,8 +13,10 @@ pgprot_t pgprot_framebuffer(pgprot_t prot,
|
|||
unsigned long offset);
|
||||
#define pgprot_framebuffer pgprot_framebuffer
|
||||
|
||||
#ifdef CONFIG_VIDEO
|
||||
bool video_is_primary_device(struct device *dev);
|
||||
#define video_is_primary_device video_is_primary_device
|
||||
#endif
|
||||
|
||||
#include <asm-generic/video.h>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue