Skip to content

Commit

Permalink
video: fbdev: via: allow COMPILE_TEST build
Browse files Browse the repository at this point in the history
This patch allows viafb driver to be build on !X86 archs
using COMPILE_TEST config option.

Since via-camera driver (VIDEO_VIA_CAMERA) depends on viafb
it also needs a little fixup.

Cc: Florian Tobias Schandinat <[email protected]>
Reviewed-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
  • Loading branch information
bzolnier committed May 15, 2018
1 parent 187a603 commit 598041f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions drivers/media/platform/via-camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
#include <linux/via-core.h>
#include <linux/via-gpio.h>
#include <linux/via_i2c.h>

#ifdef CONFIG_X86
#include <asm/olpc.h>
#else
#define machine_is_olpc(x) 0
#endif

#include "via-camera.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ config FB_SIS_315

config FB_VIA
tristate "VIA UniChrome (Pro) and Chrome9 display support"
depends on FB && PCI && X86 && GPIOLIB && I2C
depends on FB && PCI && GPIOLIB && I2C && (X86 || COMPILE_TEST)
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Expand Down
6 changes: 6 additions & 0 deletions drivers/video/fbdev/via/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
#include <linux/console.h>
#include <linux/timer.h>

#ifdef CONFIG_X86
#include <asm/olpc.h>
#else
#define machine_is_olpc(x) 0
#endif

#include "debug.h"

#include "viafbdev.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/video/fbdev/via/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/

#include <linux/via-core.h>
#include <asm/olpc.h>
#include "global.h"
#include "via_clock.h"

Expand Down
1 change: 0 additions & 1 deletion drivers/video/fbdev/via/via-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <linux/platform_device.h>
#include <linux/list.h>
#include <linux/pm.h>
#include <asm/olpc.h>

/*
* The default port config.
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/via/via_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <linux/kernel.h>
#include <linux/via-core.h>
#include <asm/olpc.h>

#include "via_clock.h"
#include "global.h"
#include "debug.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/video/fbdev/via/viafbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <linux/stat.h>
#include <linux/via-core.h>
#include <linux/via_i2c.h>
#include <asm/olpc.h>

#define _MASTER_FILE
#include "global.h"
Expand Down

0 comments on commit 598041f

Please sign in to comment.