]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
netlink: Make nlmsg_find_attr take a const nlmsghdr*.
authorNelson Elhage <nelhage@ksplice.com>
Wed, 3 Nov 2010 16:35:40 +0000 (16:35 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 13 Jul 2011 03:31:26 +0000 (05:31 +0200)
commit 6b8c92ba07287578718335ce409de8e8d7217e40 upstream.

This will let us use it on a nlmsghdr stored inside a netlink_callback.

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/net/netlink.h

index 668ad04a9171e2fdc3dc65bc97f87a0eb40c06c6..5074fd6dff2d4ab06bc236415b7de8690bff08f8 100644 (file)
@@ -384,7 +384,7 @@ static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen,
  *
  * Returns the first attribute which matches the specified type.
  */
-static inline struct nlattr *nlmsg_find_attr(struct nlmsghdr *nlh,
+static inline struct nlattr *nlmsg_find_attr(const struct nlmsghdr *nlh,
                                             int hdrlen, int attrtype)
 {
        return nla_find(nlmsg_attrdata(nlh, hdrlen),