]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
netlink: Move netlink attribute parsing support to lib
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Wed, 4 Mar 2009 06:53:30 +0000 (14:53 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 4 Mar 2009 06:53:30 +0000 (14:53 +0800)
Netlink attribute parsing may be used even if CONFIG_NET is not set.
Move it from net/netlink to lib and control its inclusion based on the new
config symbol CONFIG_NLATTR, which is selected by CONFIG_NET.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
lib/Kconfig
lib/Makefile
lib/nlattr.c [moved from net/netlink/attr.c with 100% similarity]
net/Kconfig
net/netlink/Makefile

index 03c2c24b9083c17aff9372224ec2b22912691ffb..cea9e30a88ff2b26f5b2535f31f227c91ac5625a 100644 (file)
@@ -174,4 +174,10 @@ config DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
        bool "Disable obsolete cpumask functions" if DEBUG_PER_CPU_MAPS
        depends on EXPERIMENTAL && BROKEN
 
+#
+# Netlink attribute parsing support is select'ed if needed
+#
+config NLATTR
+       bool
+
 endmenu
index 32b0e64ded27d7c1f614fdc974d0857abfc19bbc..b2c09da02cae13fa974ec949600dee89ff7a0f66 100644 (file)
@@ -84,6 +84,8 @@ obj-$(CONFIG_HAVE_ARCH_TRACEHOOK) += syscall.o
 
 obj-$(CONFIG_DYNAMIC_PRINTK_DEBUG) += dynamic_printk.o
 
+obj-$(CONFIG_NLATTR) += nlattr.o
+
 hostprogs-y    := gen_crc32table
 clean-files    := crc32table.h
 
similarity index 100%
rename from net/netlink/attr.c
rename to lib/nlattr.c
index cdb8fdef6c4aaac30b1ba6cf5ace134ea6bfcb89..eab40a481356cdeebafe444b304c0ef83a0de8cd 100644 (file)
@@ -4,6 +4,7 @@
 
 menuconfig NET
        bool "Networking support"
+       select NLATTR
        ---help---
          Unless you really know what you are doing, you should say Y here.
          The reason is that some programs need kernel networking support even
index e3589c2de49e9b5e6c76c1d4a4e02a58dda5dd46..bdd6ddf4e95beb401ddd883f7caa00b9be389b9d 100644 (file)
@@ -2,4 +2,4 @@
 # Makefile for the netlink driver.
 #
 
-obj-y                                  := af_netlink.o attr.o genetlink.o
+obj-y                                  := af_netlink.o genetlink.o