compat-wireless: convert ifndef for compat_autoconf.h
authorHauke Mehrtens <hauke@hauke-m.de>
Thu, 2 Sep 2010 13:32:54 +0000 (06:32 -0700)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Thu, 2 Sep 2010 15:06:27 +0000 (08:06 -0700)
Only ifdef CONFIG_COMPAT_KERNEL_ was converted to something checking the kernel version. Now also ifndef is converted to the correct check.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
scripts/gen-compat-autoconf.sh

index 65232ab90d9b0f6d3ab5bab656ba6cd0fe921bda..5d38ea14014de8c985ead7d3a9180176009fd254 100755 (executable)
@@ -147,10 +147,14 @@ kernel_version_req $OLDEST_KERNEL_SUPPORTED
 # For each CONFIG_FOO=x option
 for i in $(egrep '^CONFIG_|^ifdef CONFIG_|^ifndef CONFIG_|^endif #CONFIG_|^else #CONFIG_' $COMPAT_CONFIG | sed 's/ /+/'); do
        case $i in
-       'ifdef+CONFIG_'* | 'ifndef+CONFIG_'* ) #
+       'ifdef+CONFIG_'* )
                echo "#$i" | sed 's/+/ /' | sed 's/\(ifdef CONFIG_COMPAT_KERNEL_\)\([0-9]*\)/if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,\2))/'
                continue
                ;;
+       'ifndef+CONFIG_'* )
+               echo "#$i" | sed 's/+/ /' | sed 's/\(ifndef CONFIG_COMPAT_KERNEL_\)\([0-9]*\)/if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,\2))/'
+               continue
+               ;;
        'else+#CONFIG_'* | 'endif+#CONFIG_'* )
                echo "#$i */" |sed -e 's/+#/ \/* /g'
                continue