summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-04-06 20:28:42 +0200
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-04-17 02:56:37 -0300
commitf53c20e93612f708ed3b378ec9735b779dcd7d59 (patch)
treee25b76d4f0be628626c1d08ff8651ca16b893b9f /include/net
parente3492dc3760ceb981a0bb9992c249ba151b6f61d (diff)
downloadlinux-f53c20e93612f708ed3b378ec9735b779dcd7d59.tar.gz
linux-f53c20e93612f708ed3b378ec9735b779dcd7d59.tar.bz2
linux-f53c20e93612f708ed3b378ec9735b779dcd7d59.zip
Bluetooth: allow constant arguments for bacmp()/bacpy()
There is no reason to require the source arguments to be writeable so fix this to allow constant source addresses. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/bluetooth.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 591fee7d0060..6912ef9a1881 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -193,11 +193,11 @@ static inline bool bdaddr_type_is_le(__u8 type)
#define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff} })
/* Copy, swap, convert BD Address */
-static inline int bacmp(bdaddr_t *ba1, bdaddr_t *ba2)
+static inline int bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2)
{
return memcmp(ba1, ba2, sizeof(bdaddr_t));
}
-static inline void bacpy(bdaddr_t *dst, bdaddr_t *src)
+static inline void bacpy(bdaddr_t *dst, const bdaddr_t *src)
{
memcpy(dst, src, sizeof(bdaddr_t));
}