ioctlsort: sync with ioctl_lookup()

* linux/ioctlsort.c (main): Use NR and TYPE bits only, to sync with
ioctl_lookup() which looks at these bits only.
diff --git a/linux/ioctlsort.c b/linux/ioctlsort.c
index afdcc5f..6ee6c07 100644
--- a/linux/ioctlsort.c
+++ b/linux/ioctlsort.c
@@ -35,10 +35,10 @@
 int main(int argc, char** argv) {
 	int i;
 
-#if defined(POWERPC) || defined(__powerpc__)			/* unspeakable kludge */
+	/* ioctl_lookup() only looks at the NR and TYPE bits atm. */
 	for (i = 0; i < nioctls; i++)
-		ioctls[i].code &= ~_IOC_DIRMASK;
-#endif
+		ioctls[i].code &= (_IOC_NRMASK << _IOC_NRSHIFT) |
+				  (_IOC_TYPEMASK << _IOC_TYPESHIFT);
 
 	qsort(ioctls, nioctls, sizeof(ioctls[0]), compare);
 	puts ("\t/* Generated by ioctlsort */");