Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Consolidate asm/poll.h

These files are almost all the same.

This patch could be made even simpler if we don't mind POLLREMOVE turning
up in a few architectures that didn't have it previously (which should be
OK as POLLREMOVE is not used anywhere in the current tree).

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Stephen Rothwell and committed by
Linus Torvalds
04dd08b4 99eaf3c4

+66 -514
+1 -25
include/asm-alpha/poll.h
··· 1 - #ifndef __ALPHA_POLL_H 2 - #define __ALPHA_POLL_H 3 - 4 - #define POLLIN (1 << 0) 5 - #define POLLPRI (1 << 1) 6 - #define POLLOUT (1 << 2) 7 - #define POLLERR (1 << 3) 8 - #define POLLHUP (1 << 4) 9 - #define POLLNVAL (1 << 5) 10 - #define POLLRDNORM (1 << 6) 11 - #define POLLRDBAND (1 << 7) 12 - #define POLLWRNORM (1 << 8) 13 - #define POLLWRBAND (1 << 9) 14 - #define POLLMSG (1 << 10) 15 - #define POLLREMOVE (1 << 12) 16 - #define POLLRDHUP (1 << 13) 17 - 18 - 19 - struct pollfd { 20 - int fd; 21 - short events; 22 - short revents; 23 - }; 24 - 25 - #endif 1 + #include <asm-generic/poll.h>
+1 -27
include/asm-arm/poll.h
··· 1 - #ifndef __ASMARM_POLL_H 2 - #define __ASMARM_POLL_H 3 - 4 - /* These are specified by iBCS2 */ 5 - #define POLLIN 0x0001 6 - #define POLLPRI 0x0002 7 - #define POLLOUT 0x0004 8 - #define POLLERR 0x0008 9 - #define POLLHUP 0x0010 10 - #define POLLNVAL 0x0020 11 - 12 - /* The rest seem to be more-or-less nonstandard. Check them! */ 13 - #define POLLRDNORM 0x0040 14 - #define POLLRDBAND 0x0080 15 - #define POLLWRNORM 0x0100 16 - #define POLLWRBAND 0x0200 17 - #define POLLMSG 0x0400 18 - #define POLLREMOVE 0x1000 19 - #define POLLRDHUP 0x2000 20 - 21 - struct pollfd { 22 - int fd; 23 - short events; 24 - short revents; 25 - }; 26 - 27 - #endif 1 + #include <asm-generic/poll.h>
+2 -20
include/asm-arm26/poll.h
··· 1 1 #ifndef __ASMARM_POLL_H 2 2 #define __ASMARM_POLL_H 3 3 4 - /* These are specified by iBCS2 */ 5 - #define POLLIN 0x0001 6 - #define POLLPRI 0x0002 7 - #define POLLOUT 0x0004 8 - #define POLLERR 0x0008 9 - #define POLLHUP 0x0010 10 - #define POLLNVAL 0x0020 4 + #include <asm-generic/poll.h> 11 5 12 - /* The rest seem to be more-or-less nonstandard. Check them! */ 13 - #define POLLRDNORM 0x0040 14 - #define POLLRDBAND 0x0080 15 - #define POLLWRNORM 0x0100 16 - #define POLLWRBAND 0x0200 17 - #define POLLMSG 0x0400 18 - #define POLLRDHUP 0x2000 19 - 20 - struct pollfd { 21 - int fd; 22 - short events; 23 - short revents; 24 - }; 6 + #undef POLLREMOVE 25 7 26 8 #endif
+1 -27
include/asm-avr32/poll.h
··· 1 - #ifndef __ASM_AVR32_POLL_H 2 - #define __ASM_AVR32_POLL_H 3 - 4 - /* These are specified by iBCS2 */ 5 - #define POLLIN 0x0001 6 - #define POLLPRI 0x0002 7 - #define POLLOUT 0x0004 8 - #define POLLERR 0x0008 9 - #define POLLHUP 0x0010 10 - #define POLLNVAL 0x0020 11 - 12 - /* The rest seem to be more-or-less nonstandard. Check them! */ 13 - #define POLLRDNORM 0x0040 14 - #define POLLRDBAND 0x0080 15 - #define POLLWRNORM 0x0100 16 - #define POLLWRBAND 0x0200 17 - #define POLLMSG 0x0400 18 - #define POLLREMOVE 0x1000 19 - #define POLLRDHUP 0x2000 20 - 21 - struct pollfd { 22 - int fd; 23 - short events; 24 - short revents; 25 - }; 26 - 27 - #endif /* __ASM_AVR32_POLL_H */ 1 + #include <asm-generic/poll.h>
+1 -26
include/asm-cris/poll.h
··· 1 - #ifndef __ASM_CRIS_POLL_H 2 - #define __ASM_CRIS_POLL_H 3 - 4 - /* taken from asm-alpha */ 5 - 6 - #define POLLIN 1 7 - #define POLLPRI 2 8 - #define POLLOUT 4 9 - #define POLLERR 8 10 - #define POLLHUP 16 11 - #define POLLNVAL 32 12 - #define POLLRDNORM 64 13 - #define POLLRDBAND 128 14 - #define POLLWRNORM 256 15 - #define POLLWRBAND 512 16 - #define POLLMSG 1024 17 - #define POLLREMOVE 4096 18 - #define POLLRDHUP 8192 19 - 20 - struct pollfd { 21 - int fd; 22 - short events; 23 - short revents; 24 - }; 25 - 26 - #endif 1 + #include <asm-generic/poll.h>
+3 -15
include/asm-frv/poll.h
··· 1 1 #ifndef _ASM_POLL_H 2 2 #define _ASM_POLL_H 3 3 4 - #define POLLIN 1 5 - #define POLLPRI 2 6 - #define POLLOUT 4 7 - #define POLLERR 8 8 - #define POLLHUP 16 9 - #define POLLNVAL 32 10 - #define POLLRDNORM 64 11 4 #define POLLWRNORM POLLOUT 12 - #define POLLRDBAND 128 13 5 #define POLLWRBAND 256 14 - #define POLLMSG 0x0400 15 - #define POLLRDHUP 0x2000 16 6 17 - struct pollfd { 18 - int fd; 19 - short events; 20 - short revents; 21 - }; 7 + #include <asm-generic/poll.h> 8 + 9 + #undef POLLREMOVE 22 10 23 11 #endif 24 12
+1
include/asm-generic/Kbuild
··· 4 4 header-y += ioctl.h 5 5 header-y += ipc.h 6 6 header-y += mman.h 7 + header-y += poll.h 7 8 header-y += signal.h 8 9 header-y += statfs.h 9 10
+37
include/asm-generic/poll.h
··· 1 + #ifndef __ASM_GENERIC_POLL_H 2 + #define __ASM_GENERIC_POLL_H 3 + 4 + /* These are specified by iBCS2 */ 5 + #define POLLIN 0x0001 6 + #define POLLPRI 0x0002 7 + #define POLLOUT 0x0004 8 + #define POLLERR 0x0008 9 + #define POLLHUP 0x0010 10 + #define POLLNVAL 0x0020 11 + 12 + /* The rest seem to be more-or-less nonstandard. Check them! */ 13 + #define POLLRDNORM 0x0040 14 + #define POLLRDBAND 0x0080 15 + #ifndef POLLWRNORM 16 + #define POLLWRNORM 0x0100 17 + #endif 18 + #ifndef POLLWRBAND 19 + #define POLLWRBAND 0x0200 20 + #endif 21 + #ifndef POLLMSG 22 + #define POLLMSG 0x0400 23 + #endif 24 + #ifndef POLLREMOVE 25 + #define POLLREMOVE 0x1000 26 + #endif 27 + #ifndef POLLRDHUP 28 + #define POLLRDHUP 0x2000 29 + #endif 30 + 31 + struct pollfd { 32 + int fd; 33 + short events; 34 + short revents; 35 + }; 36 + 37 + #endif /* __ASM_GENERIC_POLL_H */
+3 -15
include/asm-h8300/poll.h
··· 1 1 #ifndef __H8300_POLL_H 2 2 #define __H8300_POLL_H 3 3 4 - #define POLLIN 1 5 - #define POLLPRI 2 6 - #define POLLOUT 4 7 - #define POLLERR 8 8 - #define POLLHUP 16 9 - #define POLLNVAL 32 10 - #define POLLRDNORM 64 11 4 #define POLLWRNORM POLLOUT 12 - #define POLLRDBAND 128 13 5 #define POLLWRBAND 256 14 - #define POLLMSG 0x0400 15 - #define POLLRDHUP 0x2000 16 6 17 - struct pollfd { 18 - int fd; 19 - short events; 20 - short revents; 21 - }; 7 + #include <asm-generic/poll.h> 8 + 9 + #undef POLLREMOVE 22 10 23 11 #endif
+1 -27
include/asm-i386/poll.h
··· 1 - #ifndef __i386_POLL_H 2 - #define __i386_POLL_H 3 - 4 - /* These are specified by iBCS2 */ 5 - #define POLLIN 0x0001 6 - #define POLLPRI 0x0002 7 - #define POLLOUT 0x0004 8 - #define POLLERR 0x0008 9 - #define POLLHUP 0x0010 10 - #define POLLNVAL 0x0020 11 - 12 - /* The rest seem to be more-or-less nonstandard. Check them! */ 13 - #define POLLRDNORM 0x0040 14 - #define POLLRDBAND 0x0080 15 - #define POLLWRNORM 0x0100 16 - #define POLLWRBAND 0x0200 17 - #define POLLMSG 0x0400 18 - #define POLLREMOVE 0x1000 19 - #define POLLRDHUP 0x2000 20 - 21 - struct pollfd { 22 - int fd; 23 - short events; 24 - short revents; 25 - }; 26 - 27 - #endif 1 + #include <asm-generic/poll.h>
+1 -32
include/asm-ia64/poll.h
··· 1 - #ifndef _ASM_IA64_POLL_H 2 - #define _ASM_IA64_POLL_H 3 - 4 - /* 5 - * poll(2) bit definitions. Based on <asm-i386/poll.h>. 6 - * 7 - * Modified 1998, 1999, 2002 8 - * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co 9 - */ 10 - 11 - #define POLLIN 0x0001 12 - #define POLLPRI 0x0002 13 - #define POLLOUT 0x0004 14 - #define POLLERR 0x0008 15 - #define POLLHUP 0x0010 16 - #define POLLNVAL 0x0020 17 - 18 - #define POLLRDNORM 0x0040 19 - #define POLLRDBAND 0x0080 20 - #define POLLWRNORM 0x0100 21 - #define POLLWRBAND 0x0200 22 - #define POLLMSG 0x0400 23 - #define POLLREMOVE 0x1000 24 - #define POLLRDHUP 0x2000 25 - 26 - struct pollfd { 27 - int fd; 28 - short events; 29 - short revents; 30 - }; 31 - 32 - #endif /* _ASM_IA64_POLL_H */ 1 + #include <asm-generic/poll.h>
+1 -32
include/asm-m32r/poll.h
··· 1 - #ifndef _ASM_M32R_POLL_H 2 - #define _ASM_M32R_POLL_H 3 - 4 - /* 5 - * poll(2) bit definitions. Based on <asm-i386/poll.h>. 6 - * 7 - * Modified 2004 8 - * Hirokazu Takata <takata at linux-m32r.org> 9 - */ 10 - 11 - #define POLLIN 0x0001 12 - #define POLLPRI 0x0002 13 - #define POLLOUT 0x0004 14 - #define POLLERR 0x0008 15 - #define POLLHUP 0x0010 16 - #define POLLNVAL 0x0020 17 - 18 - #define POLLRDNORM 0x0040 19 - #define POLLRDBAND 0x0080 20 - #define POLLWRNORM 0x0100 21 - #define POLLWRBAND 0x0200 22 - #define POLLMSG 0x0400 23 - #define POLLREMOVE 0x1000 24 - #define POLLRDHUP 0x2000 25 - 26 - struct pollfd { 27 - int fd; 28 - short events; 29 - short revents; 30 - }; 31 - 32 - #endif /* _ASM_M32R_POLL_H */ 1 + #include <asm-generic/poll.h>
+1 -16
include/asm-m68k/poll.h
··· 1 1 #ifndef __m68k_POLL_H 2 2 #define __m68k_POLL_H 3 3 4 - #define POLLIN 1 5 - #define POLLPRI 2 6 - #define POLLOUT 4 7 - #define POLLERR 8 8 - #define POLLHUP 16 9 - #define POLLNVAL 32 10 - #define POLLRDNORM 64 11 4 #define POLLWRNORM POLLOUT 12 - #define POLLRDBAND 128 13 5 #define POLLWRBAND 256 14 - #define POLLMSG 0x0400 15 - #define POLLREMOVE 0x1000 16 - #define POLLRDHUP 0x2000 17 6 18 - struct pollfd { 19 - int fd; 20 - short events; 21 - short revents; 22 - }; 7 + #include <asm-generic/poll.h> 23 8 24 9 #endif
+1 -20
include/asm-mips/poll.h
··· 1 1 #ifndef __ASM_POLL_H 2 2 #define __ASM_POLL_H 3 3 4 - #define POLLIN 0x0001 5 - #define POLLPRI 0x0002 6 - #define POLLOUT 0x0004 7 - 8 - #define POLLERR 0x0008 9 - #define POLLHUP 0x0010 10 - #define POLLNVAL 0x0020 11 - 12 - #define POLLRDNORM 0x0040 13 - #define POLLRDBAND 0x0080 14 4 #define POLLWRNORM POLLOUT 15 5 #define POLLWRBAND 0x0100 16 6 17 - /* These seem to be more or less nonstandard ... */ 18 - #define POLLMSG 0x0400 19 - #define POLLREMOVE 0x1000 20 - #define POLLRDHUP 0x2000 21 - 22 - struct pollfd { 23 - int fd; 24 - short events; 25 - short revents; 26 - }; 7 + #include <asm-generic/poll.h> 27 8 28 9 #endif /* __ASM_POLL_H */
+1 -27
include/asm-parisc/poll.h
··· 1 - #ifndef __PARISC_POLL_H 2 - #define __PARISC_POLL_H 3 - 4 - /* These are specified by iBCS2 */ 5 - #define POLLIN 0x0001 6 - #define POLLPRI 0x0002 7 - #define POLLOUT 0x0004 8 - #define POLLERR 0x0008 9 - #define POLLHUP 0x0010 10 - #define POLLNVAL 0x0020 11 - 12 - /* The rest seem to be more-or-less nonstandard. Check them! */ 13 - #define POLLRDNORM 0x0040 14 - #define POLLRDBAND 0x0080 15 - #define POLLWRNORM 0x0100 16 - #define POLLWRBAND 0x0200 17 - #define POLLMSG 0x0400 18 - #define POLLREMOVE 0x1000 19 - #define POLLRDHUP 0x2000 20 - 21 - struct pollfd { 22 - int fd; 23 - short events; 24 - short revents; 25 - }; 26 - 27 - #endif 1 + #include <asm-generic/poll.h>
+1 -24
include/asm-powerpc/poll.h
··· 1 - #ifndef _ASM_POWERPC_POLL_H 2 - #define _ASM_POWERPC_POLL_H 3 - 4 - #define POLLIN 0x0001 5 - #define POLLPRI 0x0002 6 - #define POLLOUT 0x0004 7 - #define POLLERR 0x0008 8 - #define POLLHUP 0x0010 9 - #define POLLNVAL 0x0020 10 - #define POLLRDNORM 0x0040 11 - #define POLLRDBAND 0x0080 12 - #define POLLWRNORM 0x0100 13 - #define POLLWRBAND 0x0200 14 - #define POLLMSG 0x0400 15 - #define POLLREMOVE 0x1000 16 - #define POLLRDHUP 0x2000 17 - 18 - struct pollfd { 19 - int fd; 20 - short events; 21 - short revents; 22 - }; 23 - 24 - #endif /* _ASM_POWERPC_POLL_H */ 1 + #include <asm-generic/poll.h>
+1 -35
include/asm-s390/poll.h
··· 1 - /* 2 - * include/asm-s390/poll.h 3 - * 4 - * S390 version 5 - * 6 - * Derived from "include/asm-i386/poll.h" 7 - */ 8 - 9 - #ifndef __S390_POLL_H 10 - #define __S390_POLL_H 11 - 12 - /* These are specified by iBCS2 */ 13 - #define POLLIN 0x0001 14 - #define POLLPRI 0x0002 15 - #define POLLOUT 0x0004 16 - #define POLLERR 0x0008 17 - #define POLLHUP 0x0010 18 - #define POLLNVAL 0x0020 19 - 20 - /* The rest seem to be more-or-less nonstandard. Check them! */ 21 - #define POLLRDNORM 0x0040 22 - #define POLLRDBAND 0x0080 23 - #define POLLWRNORM 0x0100 24 - #define POLLWRBAND 0x0200 25 - #define POLLMSG 0x0400 26 - #define POLLREMOVE 0x1000 27 - #define POLLRDHUP 0x2000 28 - 29 - struct pollfd { 30 - int fd; 31 - short events; 32 - short revents; 33 - }; 34 - 35 - #endif 1 + #include <asm-generic/poll.h>
+1 -27
include/asm-sh/poll.h
··· 1 - #ifndef __ASM_SH_POLL_H 2 - #define __ASM_SH_POLL_H 3 - 4 - /* These are specified by iBCS2 */ 5 - #define POLLIN 0x0001 6 - #define POLLPRI 0x0002 7 - #define POLLOUT 0x0004 8 - #define POLLERR 0x0008 9 - #define POLLHUP 0x0010 10 - #define POLLNVAL 0x0020 11 - 12 - /* The rest seem to be more-or-less nonstandard. Check them! */ 13 - #define POLLRDNORM 0x0040 14 - #define POLLRDBAND 0x0080 15 - #define POLLWRNORM 0x0100 16 - #define POLLWRBAND 0x0200 17 - #define POLLMSG 0x0400 18 - #define POLLREMOVE 0x1000 19 - #define POLLRDHUP 0x2000 20 - 21 - struct pollfd { 22 - int fd; 23 - short events; 24 - short revents; 25 - }; 26 - 27 - #endif /* __ASM_SH_POLL_H */ 1 + #include <asm-generic/poll.h>
+2 -31
include/asm-sh64/poll.h
··· 1 1 #ifndef __ASM_SH64_POLL_H 2 2 #define __ASM_SH64_POLL_H 3 3 4 - /* 5 - * This file is subject to the terms and conditions of the GNU General Public 6 - * License. See the file "COPYING" in the main directory of this archive 7 - * for more details. 8 - * 9 - * include/asm-sh64/poll.h 10 - * 11 - * Copyright (C) 2000, 2001 Paolo Alberelli 12 - * 13 - */ 4 + #include <asm-generic/poll.h> 14 5 15 - /* These are specified by iBCS2 */ 16 - #define POLLIN 0x0001 17 - #define POLLPRI 0x0002 18 - #define POLLOUT 0x0004 19 - #define POLLERR 0x0008 20 - #define POLLHUP 0x0010 21 - #define POLLNVAL 0x0020 22 - 23 - /* The rest seem to be more-or-less nonstandard. Check them! */ 24 - #define POLLRDNORM 0x0040 25 - #define POLLRDBAND 0x0080 26 - #define POLLWRNORM 0x0100 27 - #define POLLWRBAND 0x0200 28 - #define POLLMSG 0x0400 29 - #define POLLRDHUP 0x2000 30 - 31 - struct pollfd { 32 - int fd; 33 - short events; 34 - short revents; 35 - }; 6 + #undef POLLREMOVE 36 7 37 8 #endif /* __ASM_SH64_POLL_H */
+1 -13
include/asm-sparc/poll.h
··· 1 1 #ifndef __SPARC_POLL_H 2 2 #define __SPARC_POLL_H 3 3 4 - #define POLLIN 1 5 - #define POLLPRI 2 6 - #define POLLOUT 4 7 - #define POLLERR 8 8 - #define POLLHUP 16 9 - #define POLLNVAL 32 10 - #define POLLRDNORM 64 11 4 #define POLLWRNORM POLLOUT 12 - #define POLLRDBAND 128 13 5 #define POLLWRBAND 256 14 6 #define POLLMSG 512 15 7 #define POLLREMOVE 1024 16 8 #define POLLRDHUP 2048 17 9 18 - struct pollfd { 19 - int fd; 20 - short events; 21 - short revents; 22 - }; 10 + #include <asm-generic/poll.h> 23 11 24 12 #endif
+1 -13
include/asm-sparc64/poll.h
··· 1 1 #ifndef __SPARC64_POLL_H 2 2 #define __SPARC64_POLL_H 3 3 4 - #define POLLIN 1 5 - #define POLLPRI 2 6 - #define POLLOUT 4 7 - #define POLLERR 8 8 - #define POLLHUP 16 9 - #define POLLNVAL 32 10 - #define POLLRDNORM 64 11 4 #define POLLWRNORM POLLOUT 12 - #define POLLRDBAND 128 13 5 #define POLLWRBAND 256 14 6 #define POLLMSG 512 15 7 #define POLLREMOVE 1024 16 8 #define POLLRDHUP 2048 17 9 18 - struct pollfd { 19 - int fd; 20 - short events; 21 - short revents; 22 - }; 10 + #include <asm-generic/poll.h> 23 11 24 12 #endif
+1 -16
include/asm-v850/poll.h
··· 1 1 #ifndef __V850_POLL_H__ 2 2 #define __V850_POLL_H__ 3 3 4 - #define POLLIN 0x0001 5 - #define POLLPRI 0x0002 6 - #define POLLOUT 0x0004 7 - #define POLLERR 0x0008 8 - #define POLLHUP 0x0010 9 - #define POLLNVAL 0x0020 10 - #define POLLRDNORM 0x0040 11 4 #define POLLWRNORM POLLOUT 12 - #define POLLRDBAND 0x0080 13 5 #define POLLWRBAND 0x0100 14 - #define POLLMSG 0x0400 15 - #define POLLREMOVE 0x1000 16 - #define POLLRDHUP 0x2000 17 6 18 - struct pollfd { 19 - int fd; 20 - short events; 21 - short revents; 22 - }; 7 + #include <asm-generic/poll.h> 23 8 24 9 #endif /* __V850_POLL_H__ */
+1 -27
include/asm-x86_64/poll.h
··· 1 - #ifndef __x86_64_POLL_H 2 - #define __x86_64_POLL_H 3 - 4 - /* These are specified by iBCS2 */ 5 - #define POLLIN 0x0001 6 - #define POLLPRI 0x0002 7 - #define POLLOUT 0x0004 8 - #define POLLERR 0x0008 9 - #define POLLHUP 0x0010 10 - #define POLLNVAL 0x0020 11 - 12 - /* The rest seem to be more-or-less nonstandard. Check them! */ 13 - #define POLLRDNORM 0x0040 14 - #define POLLRDBAND 0x0080 15 - #define POLLWRNORM 0x0100 16 - #define POLLWRBAND 0x0200 17 - #define POLLMSG 0x0400 18 - #define POLLREMOVE 0x1000 19 - #define POLLRDHUP 0x2000 20 - 21 - struct pollfd { 22 - int fd; 23 - short events; 24 - short revents; 25 - }; 26 - 27 - #endif 1 + #include <asm-generic/poll.h>
+1 -19
include/asm-xtensa/poll.h
··· 11 11 #ifndef _XTENSA_POLL_H 12 12 #define _XTENSA_POLL_H 13 13 14 - 15 - #define POLLIN 0x0001 16 - #define POLLPRI 0x0002 17 - #define POLLOUT 0x0004 18 - 19 - #define POLLERR 0x0008 20 - #define POLLHUP 0x0010 21 - #define POLLNVAL 0x0020 22 - 23 - #define POLLRDNORM 0x0040 24 - #define POLLRDBAND 0x0080 25 14 #define POLLWRNORM POLLOUT 26 15 #define POLLWRBAND 0x0100 27 - 28 - #define POLLMSG 0x0400 29 16 #define POLLREMOVE 0x0800 30 - #define POLLRDHUP 0x2000 31 17 32 - struct pollfd { 33 - int fd; 34 - short events; 35 - short revents; 36 - }; 18 + #include <asm-generic/poll.h> 37 19 38 20 #endif /* _XTENSA_POLL_H */