[backfire/packages] lcd4linux: refresh patches
[openwrt/svn-archive/archive.git] / utils / lcd4linux / patches / 120-remove_parport_outb.patch
1 --- a/drv_generic_parport.c
2 +++ b/drv_generic_parport.c
3 @@ -39,16 +39,6 @@
4 #include <sys/stat.h>
5 #include <sys/ioctl.h>
6
7 -#ifdef HAVE_SYS_IO_H
8 -#include <sys/io.h>
9 -#define WITH_OUTB
10 -#else
11 -#ifdef HAVE_ASM_IO_H
12 -#include <asm/io.h>
13 -#define WITH_OUTB
14 -#endif
15 -#endif
16 -
17 #if defined (HAVE_LINUX_PARPORT_H) && defined (HAVE_LINUX_PPDEV_H)
18 #define WITH_PPDEV
19 #include <linux/parport.h>
20 @@ -68,6 +58,11 @@
21 /* these signals are inverted by hardware on the parallel port */
22 #define PARPORT_CONTROL_INVERTED (PARPORT_CONTROL_STROBE | PARPORT_CONTROL_SELECT | PARPORT_CONTROL_AUTOFD)
23
24 +#ifndef WITH_OUTB
25 +#define inb(foo) 0
26 +#define outb(foo,bar) 0
27 +#endif
28 +
29 #if !defined(WITH_OUTB) && !defined(WITH_PPDEV)
30 #error neither outb() nor ppdev() possible
31 #error cannot compile parallel port driver