]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Remove duplicate constant for RFCOMM PSM
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 20 Dec 2014 17:00:41 +0000 (18:00 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Sat, 20 Dec 2014 17:55:04 +0000 (19:55 +0200)
The RFCOMM_PSM constant is actually a duplicate. So remove it and
use the L2CAP_PSM_RFCOMM constant instead.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/rfcomm.h
net/bluetooth/rfcomm/core.c

index 578b83127af18545e51c26b859dfa6f80100c263..4190af53a46ad1a5f7868f4add65363e5ada9b20 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef __RFCOMM_H
 #define __RFCOMM_H
 
-#define RFCOMM_PSM 3
-
 #define RFCOMM_CONN_TIMEOUT (HZ * 30)
 #define RFCOMM_DISC_TIMEOUT (HZ * 20)
 #define RFCOMM_AUTH_TIMEOUT (HZ * 25)
index 73f8c75abe6ec40d5376bdeb5114ab99f2e737f1..4fea24275b17a5b3ab4fa614c3982d8cdaed8fee 100644 (file)
@@ -771,7 +771,7 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
 
        bacpy(&addr.l2_bdaddr, dst);
        addr.l2_family = AF_BLUETOOTH;
-       addr.l2_psm    = cpu_to_le16(RFCOMM_PSM);
+       addr.l2_psm    = cpu_to_le16(L2CAP_PSM_RFCOMM);
        addr.l2_cid    = 0;
        addr.l2_bdaddr_type = BDADDR_BREDR;
        *err = kernel_connect(sock, (struct sockaddr *) &addr, sizeof(addr), O_NONBLOCK);
@@ -2038,7 +2038,7 @@ static int rfcomm_add_listener(bdaddr_t *ba)
        /* Bind socket */
        bacpy(&addr.l2_bdaddr, ba);
        addr.l2_family = AF_BLUETOOTH;
-       addr.l2_psm    = cpu_to_le16(RFCOMM_PSM);
+       addr.l2_psm    = cpu_to_le16(L2CAP_PSM_RFCOMM);
        addr.l2_cid    = 0;
        addr.l2_bdaddr_type = BDADDR_BREDR;
        err = kernel_bind(sock, (struct sockaddr *) &addr, sizeof(addr));