From: Seung-Woo Kim Date: Fri, 30 Sep 2016 08:15:12 +0000 (+0900) Subject: Bluetooth: fix build error without BT_6LOWPAN X-Git-Tag: submit/tizen/20161010.025055~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F90488%2F2;p=platform%2Fkernel%2Flinux-exynos.git Bluetooth: fix build error without BT_6LOWPAN Without config option BT_6LOWPAN, no 6lowpan functions are built-in, so it causes build error. This patch fixes the build error. Change-Id: If5bcea028dc8127a0451fb4f35bd4cd83ca43dc5 Signed-off-by: Seung-Woo Kim --- diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 6e25b81e5b60..4830ea890192 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h @@ -383,10 +383,4 @@ void mgmt_exit(void); void bt_sock_reclassify_lock(struct sock *sk, int proto); -#ifdef TIZEN_BT -/* IPSP : initialize/deinitialize 6lowpan */ -void bt_6lowpan_enable(void); -void bt_6lowpan_disable(void); -#endif - #endif /* __BLUETOOTH_H */ diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 83869fee6792..11b05eccd6e8 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h @@ -939,9 +939,19 @@ int l2cap_register_user(struct l2cap_conn *conn, struct l2cap_user *user); void l2cap_unregister_user(struct l2cap_conn *conn, struct l2cap_user *user); #ifdef TIZEN_BT +#ifdef CONFIG_BT_6LOWPAN +/* IPSP : initialize/deinitialize 6lowpan */ +void bt_6lowpan_enable(void); +void bt_6lowpan_disable(void); /* IPSP: Connect and Disconnect */ int _bt_6lowpan_connect(bdaddr_t *addr, u8 dst_type); int _bt_6lowpan_disconnect(struct l2cap_conn *conn, u8 dst_type); +#else +static inline void bt_6lowpan_enable(void) { } +static inline void bt_6lowpan_disable(void) { } +static inline int _bt_6lowpan_connect(bdaddr_t *addr, u8 dst_type) { return -ENODEV; } +static inline int _bt_6lowpan_disconnect(struct l2cap_conn *conn, u8 dst_type) { return -ENODEV; } #endif +#endif /* TIZEN_BT */ #endif /* __L2CAP_H */