Skip to content

Commit 598041f

Browse files
committed
video: fbdev: via: allow COMPILE_TEST build
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]>
1 parent 187a603 commit 598041f

File tree

7 files changed

+13
-5
lines changed

7 files changed

+13
-5
lines changed

drivers/media/platform/via-camera.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@
2727
#include <linux/via-core.h>
2828
#include <linux/via-gpio.h>
2929
#include <linux/via_i2c.h>
30+
31+
#ifdef CONFIG_X86
3032
#include <asm/olpc.h>
33+
#else
34+
#define machine_is_olpc(x) 0
35+
#endif
3136

3237
#include "via-camera.h"
3338

drivers/video/fbdev/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1437,7 +1437,7 @@ config FB_SIS_315
14371437

14381438
config FB_VIA
14391439
tristate "VIA UniChrome (Pro) and Chrome9 display support"
1440-
depends on FB && PCI && X86 && GPIOLIB && I2C
1440+
depends on FB && PCI && GPIOLIB && I2C && (X86 || COMPILE_TEST)
14411441
select FB_CFB_FILLRECT
14421442
select FB_CFB_COPYAREA
14431443
select FB_CFB_IMAGEBLIT

drivers/video/fbdev/via/global.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
#include <linux/console.h>
3434
#include <linux/timer.h>
3535

36+
#ifdef CONFIG_X86
37+
#include <asm/olpc.h>
38+
#else
39+
#define machine_is_olpc(x) 0
40+
#endif
41+
3642
#include "debug.h"
3743

3844
#include "viafbdev.h"

drivers/video/fbdev/via/hw.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
*/
2121

2222
#include <linux/via-core.h>
23-
#include <asm/olpc.h>
2423
#include "global.h"
2524
#include "via_clock.h"
2625

drivers/video/fbdev/via/via-core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <linux/platform_device.h>
1818
#include <linux/list.h>
1919
#include <linux/pm.h>
20-
#include <asm/olpc.h>
2120

2221
/*
2322
* The default port config.

drivers/video/fbdev/via/via_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#include <linux/kernel.h>
2727
#include <linux/via-core.h>
28-
#include <asm/olpc.h>
28+
2929
#include "via_clock.h"
3030
#include "global.h"
3131
#include "debug.h"

drivers/video/fbdev/via/viafbdev.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <linux/stat.h>
2626
#include <linux/via-core.h>
2727
#include <linux/via_i2c.h>
28-
#include <asm/olpc.h>
2928

3029
#define _MASTER_FILE
3130
#include "global.h"

0 commit comments

Comments
 (0)