]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Cleanup ARM ioperm implementation
authorAurelien Jarno <aurelien@aurel32.net>
Fri, 11 Dec 2015 21:16:34 +0000 (22:16 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 12 Dec 2015 10:52:06 +0000 (11:52 +0100)
Since GLIBC requires a minimum 2.6.32 kernel, the patch cleanups
the ARM ioperm by removing pre-2.4.23 kernel support.

ChangeLog
sysdeps/unix/sysv/linux/arm/ioperm.c

index 4bda9348d3f5422928df41d0a01df2a214d1e5fa..13be8a8115e3633a7e18eae4d94a5f82710ed007 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-12-11  Aurelien Jarno  <aurelien@aurel32.net>
+
+       * sysdeps/unix/sysv/linux/arm/ioperm.c: Do not include
+       <linux/version.h>.
+       [LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,23)]: Remove
+       conditional code.
+       (init_iosys): Use CTL_BUS_ISA instead of BUS_ISA in iobase_name
+       and ioshift_name initialization.
+
 2015-12-11  Steve Ellcey  <sellcey@imgtec.com>
 
        * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f):
index 2291defc925e8682c0b5b558a1eaa16abf1650fd..053d53b3f6454879757ae7e9a17dc6e013d59f59 100644 (file)
@@ -43,7 +43,6 @@
 #include <sys/types.h>
 #include <sys/mman.h>
 
-#include <linux/version.h>
 #include <sys/sysctl.h>
 
 #define PATH_ARM_SYSTYPE       "/etc/arm_systype"
@@ -94,19 +93,13 @@ static struct platform {
  *    values.
  */
 
-/* The Linux kernel headers renamed this constant between 2.5.26 and
-   2.5.27.  It was backported to 2.4 between 2.4.22 and 2.4.23.  */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,23)
-# define BUS_ISA CTL_BUS_ISA
-#endif
-
 static int
 init_iosys (void)
 {
   char systype[256];
   int i, n;
-  static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
-  static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
+  static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
+  static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
   size_t len = sizeof(io.base);
 
   if (! __sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)