Browse Source

media: meye: allow building it with COMPILE_TEST on non-x86

This driver depends on sony-laptop driver, but this is available
only for x86. So, add a stub function, in order to allow building
it on non-x86 too.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mauro Carvalho Chehab 7 years ago
parent
commit
6159e12e11
2 changed files with 6 additions and 1 deletions
  1. 2 1
      drivers/media/pci/meye/Kconfig
  2. 4 0
      include/linux/sony-laptop.h

+ 2 - 1
drivers/media/pci/meye/Kconfig

@@ -1,6 +1,7 @@
 config VIDEO_MEYE
 config VIDEO_MEYE
 	tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
 	tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
-	depends on PCI && SONY_LAPTOP && VIDEO_V4L2
+	depends on PCI && VIDEO_V4L2
+	depends on SONY_LAPTOP || COMPILE_TEST
 	---help---
 	---help---
 	  This is the video4linux driver for the Motion Eye camera found
 	  This is the video4linux driver for the Motion Eye camera found
 	  in the Vaio Picturebook laptops. Please read the material in
 	  in the Vaio Picturebook laptops. Please read the material in

+ 4 - 0
include/linux/sony-laptop.h

@@ -28,7 +28,11 @@
 #define SONY_PIC_COMMAND_GETCAMERAROMVERSION	18	/* obsolete */
 #define SONY_PIC_COMMAND_GETCAMERAROMVERSION	18	/* obsolete */
 #define SONY_PIC_COMMAND_GETCAMERAREVISION	19	/* obsolete */
 #define SONY_PIC_COMMAND_GETCAMERAREVISION	19	/* obsolete */
 
 
+#if IS_ENABLED(CONFIG_SONY_LAPTOP)
 int sony_pic_camera_command(int command, u8 value);
 int sony_pic_camera_command(int command, u8 value);
+#else
+static inline int sony_pic_camera_command(int command, u8 value) { return 0; };
+#endif
 
 
 #endif	/* __KERNEL__ */
 #endif	/* __KERNEL__ */