Commit 45865dab authored by David S. Miller's avatar David S. Miller

Merge branch 'for-upstream' of...

Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next

Johan Hedberg says:

====================
pull request: bluetooth-next 2017-09-03

Here's one last bluetooth-next pull request for the 4.14 kernel:

 - NULL pointer fix in ca8210 802.15.4 driver
 - A few "const" fixes
 - New Kconfig option for disabling legacy interfaces

Please let me know if there are any issues pulling. Thanks.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents f98ce389 65bce462
...@@ -917,10 +917,7 @@ static int ca8210_spi_transfer( ...@@ -917,10 +917,7 @@ static int ca8210_spi_transfer(
struct cas_control *cas_ctl; struct cas_control *cas_ctl;
if (!spi) { if (!spi) {
dev_crit( pr_crit("NULL spi device passed to %s\n", __func__);
&spi->dev,
"NULL spi device passed to ca8210_spi_transfer\n"
);
return -ENODEV; return -ENODEV;
} }
......
...@@ -233,7 +233,7 @@ static inline void bacpy(bdaddr_t *dst, const bdaddr_t *src) ...@@ -233,7 +233,7 @@ static inline void bacpy(bdaddr_t *dst, const bdaddr_t *src)
memcpy(dst, src, sizeof(bdaddr_t)); memcpy(dst, src, sizeof(bdaddr_t));
} }
void baswap(bdaddr_t *dst, bdaddr_t *src); void baswap(bdaddr_t *dst, const bdaddr_t *src);
/* Common socket structures and functions */ /* Common socket structures and functions */
......
...@@ -126,4 +126,14 @@ config BT_DEBUGFS ...@@ -126,4 +126,14 @@ config BT_DEBUGFS
Provide extensive information about internal Bluetooth states Provide extensive information about internal Bluetooth states
in debugfs. in debugfs.
config BT_LEGACY_IOCTL
bool "Enable legacy ioctl interfaces"
depends on BT && BT_BREDR
default y
help
Enable support for legacy ioctl interfaces. This is only needed
for old and deprecated applications using direct ioctl calls for
controller management. Since Linux 3.4 all configuration and
setup is done via mgmt interface and this is no longer needed.
source "drivers/bluetooth/Kconfig" source "drivers/bluetooth/Kconfig"
...@@ -878,6 +878,7 @@ static int hci_sock_release(struct socket *sock) ...@@ -878,6 +878,7 @@ static int hci_sock_release(struct socket *sock)
return 0; return 0;
} }
#ifdef CONFIG_BT_LEGACY_IOCTL
static int hci_sock_blacklist_add(struct hci_dev *hdev, void __user *arg) static int hci_sock_blacklist_add(struct hci_dev *hdev, void __user *arg)
{ {
bdaddr_t bdaddr; bdaddr_t bdaddr;
...@@ -1049,6 +1050,7 @@ static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, ...@@ -1049,6 +1050,7 @@ static int hci_sock_ioctl(struct socket *sock, unsigned int cmd,
release_sock(sk); release_sock(sk);
return err; return err;
} }
#endif
static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, static int hci_sock_bind(struct socket *sock, struct sockaddr *addr,
int addr_len) int addr_len)
...@@ -1969,7 +1971,11 @@ static const struct proto_ops hci_sock_ops = { ...@@ -1969,7 +1971,11 @@ static const struct proto_ops hci_sock_ops = {
.getname = hci_sock_getname, .getname = hci_sock_getname,
.sendmsg = hci_sock_sendmsg, .sendmsg = hci_sock_sendmsg,
.recvmsg = hci_sock_recvmsg, .recvmsg = hci_sock_recvmsg,
#ifdef CONFIG_BT_LEGACY_IOCTL
.ioctl = hci_sock_ioctl, .ioctl = hci_sock_ioctl,
#else
.ioctl = sock_no_ioctl,
#endif
.poll = datagram_poll, .poll = datagram_poll,
.listen = sock_no_listen, .listen = sock_no_listen,
.shutdown = sock_no_shutdown, .shutdown = sock_no_shutdown,
......
...@@ -13,7 +13,7 @@ static void bt_link_release(struct device *dev) ...@@ -13,7 +13,7 @@ static void bt_link_release(struct device *dev)
kfree(conn); kfree(conn);
} }
static struct device_type bt_link = { static const struct device_type bt_link = {
.name = "link", .name = "link",
.release = bt_link_release, .release = bt_link_release,
}; };
...@@ -86,7 +86,7 @@ static void bt_host_release(struct device *dev) ...@@ -86,7 +86,7 @@ static void bt_host_release(struct device *dev)
module_put(THIS_MODULE); module_put(THIS_MODULE);
} }
static struct device_type bt_host = { static const struct device_type bt_host = {
.name = "host", .name = "host",
.release = bt_host_release, .release = bt_host_release,
}; };
......
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/bluetooth.h>
void baswap(bdaddr_t *dst, bdaddr_t *src) void baswap(bdaddr_t *dst, const bdaddr_t *src)
{ {
unsigned char *d = (unsigned char *) dst; const unsigned char *s = (const unsigned char *)src;
unsigned char *s = (unsigned char *) src; unsigned char *d = (unsigned char *)dst;
unsigned int i; unsigned int i;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
static int open_count; static int open_count;
static struct header_ops lowpan_header_ops = { static const struct header_ops lowpan_header_ops = {
.create = lowpan_header_create, .create = lowpan_header_create,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment