X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=fs%2Fcompat_ioctl.c;h=d2c38875ab296e45741c5dcf966da56ec51d8f96;hb=dcf36bfa5de6d4e37878d4c98b6986fee4eb8b4c;hp=c666769a875d2fc0e80927caf6db038b036bc42b;hpb=536ea4e4198eeaa5a73fb734ea675e621609bb7e;p=powerpc.git diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index c666769a87..d2c38875ab 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -72,6 +72,7 @@ #include #include #include +#include #include /* siocdevprivate_ioctl */ #include @@ -1521,8 +1522,7 @@ static struct { { ATM_QUERYLOOP32, ATM_QUERYLOOP } }; -#define NR_ATM_IOCTL (sizeof(atm_ioctl_map)/sizeof(atm_ioctl_map[0])) - +#define NR_ATM_IOCTL ARRAY_SIZE(atm_ioctl_map) static int do_atm_iobuf(unsigned int fd, unsigned int cmd, unsigned long arg) { @@ -1823,7 +1823,7 @@ static struct { { FDWERRORGET32, FDWERRORGET } }; -#define NR_FD_IOCTL_TRANS (sizeof(fd_ioctl_trans_table)/sizeof(fd_ioctl_trans_table[0])) +#define NR_FD_IOCTL_TRANS ARRAY_SIZE(fd_ioctl_trans_table) static int fd_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) {