[haiku-commits] haiku: hrev52081 - in src: add-ons/kernel/drivers/bluetooth/h2/h2generic servers/bluetooth

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 7 Jul 2018 18:31:50 -0400 (EDT)

hrev52081 adds 1 changeset to branch 'master'
old head: cf5cc3958da752b426bac36772153f0d61281633
new head: b0e0298370e176a0209d824b1ba45e537e185f3e
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=b0e0298370e1+%5Ecf5cc3958da7

----------------------------------------------------------------------------

b0e0298370e1: bluetooth: Remove non-Haiku target platforms logic.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev52081
Commit:      b0e0298370e176a0209d824b1ba45e537e185f3e
URL:         https://git.haiku-os.org/haiku/commit/?id=b0e0298370e1
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Sat Jul  7 21:04:19 2018 UTC

----------------------------------------------------------------------------

4 files changed, 47 deletions(-)
.../drivers/bluetooth/h2/h2generic/h2generic.cpp | 10 --------
.../drivers/bluetooth/h2/h2generic/h2generic.h   |  9 -------
.../bluetooth/h2/h2generic/h2transactions.cpp    | 26 --------------------
src/servers/bluetooth/DeskbarReplicant.cpp       |  2 --

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp 
b/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp
index d0d6b2f773..16a2c225d8 100644
--- a/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp
+++ b/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp
@@ -71,14 +71,8 @@ usb_support_descriptor supported_devices[] = {
 };
 
 /* add a device to the list of connected devices */
-#ifdef HAIKU_TARGET_PLATFORM_HAIKU
 static bt_usb_dev*
 spawn_device(usb_device usb_dev)
-#else
-static bt_usb_dev*
-spawn_device(usb_device* usb_dev)
-#endif
-
 {
        CALLED();
 
@@ -209,12 +203,8 @@ fetch_device(bt_usb_dev* dev, hci_id hid)
 #endif
 
 // called by USB Manager when device is added to the USB
-#ifdef HAIKU_TARGET_PLATFORM_HAIKU
 static status_t
 device_added(usb_device dev, void** cookie)
-#else
-device_added(usb_device* dev, void** cookie)
-#endif
 {
        const usb_interface_info*               interface;
        const usb_device_descriptor*    desc;
diff --git a/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.h 
b/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.h
index 78142c08a5..e41c95e78f 100644
--- a/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.h
+++ b/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.h
@@ -12,12 +12,7 @@
 #include <net_device.h>
 
 #include <OS.h>
-#ifdef HAIKU_TARGET_PLATFORM_HAIKU
 #include <USB3.h>
-#else
-#include <USB_spec.h>
-#include <USB.h>
-#endif
 
 #include <util/list.h>
 #include <bluetooth/HCI/btHCI.h>
@@ -61,11 +56,7 @@ extern struct bluetooth_core_data_module_info* btCoreData;
 typedef struct bt_usb_dev bt_usb_dev;
 
 struct bt_usb_dev {
-#ifdef HAIKU_TARGET_PLATFORM_HAIKU
        usb_device              dev;          /* opaque handle */
-#else
-       usb_device*             dev;          /* opaque handle */
-#endif
        hci_id                                  hdev; /* HCI device id*/
        bluetooth_device*               ndev;
 
diff --git 
a/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2transactions.cpp 
b/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2transactions.cpp
index 99ea5f4ced..ccf3083c72 100644
--- a/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2transactions.cpp
+++ b/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2transactions.cpp
@@ -25,17 +25,10 @@
 
 /* Forward declaration */
 
-#ifndef HAIKU_TARGET_PLATFORM_HAIKU
-void acl_tx_complete(void* cookie, uint32 status, void* data, uint32 
actual_len);
-void acl_rx_complete(void* cookie, uint32 status, void* data, uint32 
actual_len);
-void command_complete(void* cookie, uint32 status, void* data, uint32 
actual_len);
-void event_complete(void* cookie, uint32 status, void* data, uint32 
actual_len);
-#else
 void acl_tx_complete(void* cookie, status_t status, void* data, size_t 
actual_len);
 void acl_rx_complete(void* cookie, status_t status, void* data, size_t 
actual_len);
 void command_complete(void* cookie, status_t status, void* data, size_t 
actual_len);
 void event_complete(void* cookie, status_t status, void* data, size_t 
actual_len);
-#endif
 
 
 static status_t
@@ -53,11 +46,7 @@ assembly_rx(bt_usb_dev* bdev, bt_packet_t type, void* data, 
int count)
 #endif
 
 void
-#ifndef HAIKU_TARGET_PLATFORM_HAIKU
-event_complete(void* cookie, uint32 status, void* data, uint32 actual_len)
-#else
 event_complete(void* cookie, status_t status, void* data, size_t actual_len)
-#endif
 {
        bt_usb_dev* bdev = (bt_usb_dev*)cookie;
        // bt_usb_dev* bdev = fetch_device(cookie, 0); -> safer / slower option
@@ -99,11 +88,7 @@ resubmit:
 
 
 void
-#ifndef HAIKU_TARGET_PLATFORM_HAIKU
-acl_rx_complete(void* cookie, uint32 status, void* data, uint32 actual_len)
-#else
 acl_rx_complete(void* cookie, status_t status, void* data, size_t actual_len)
-#endif
 {
        bt_usb_dev* bdev = (bt_usb_dev*)cookie;
        // bt_usb_dev* bdev = fetch_device(cookie, 0); -> safer / slower option
@@ -206,11 +191,7 @@ submit_rx_sco(bt_usb_dev* bdev)
 #endif
 
 void
-#ifndef HAIKU_TARGET_PLATFORM_HAIKU
-command_complete(void* cookie, uint32 status, void* data, uint32 actual_len)
-#else
 command_complete(void* cookie, status_t status, void* data, size_t actual_len)
-#endif
 {
        snet_buffer* snbuf = (snet_buffer*)cookie;
        bt_usb_dev* bdev = (bt_usb_dev*)snb_cookie(snbuf);
@@ -235,11 +216,7 @@ command_complete(void* cookie, status_t status, void* 
data, size_t actual_len)
 
 
 void
-#ifndef HAIKU_TARGET_PLATFORM_HAIKU
-acl_tx_complete(void* cookie, uint32 status, void* data, uint32 actual_len)
-#else
 acl_tx_complete(void* cookie, status_t status, void* data, size_t actual_len)
-#endif
 {
        net_buffer* nbuf = (net_buffer*)cookie;
        bt_usb_dev* bdev = GET_DEVICE(nbuf);
@@ -287,9 +264,6 @@ submit_tx_command(bt_usb_dev* bdev, snet_buffer* snbuf)
 
        error = usb->queue_request(bdev->dev, bRequestType, bRequest,
                value, wIndex, wLength, snb_get(snbuf),
-#ifndef HAIKU_TARGET_PLATFORM_HAIKU
-               wLength,
-#endif
                command_complete, (void*) snbuf);
 
        if (error != B_OK) {
diff --git a/src/servers/bluetooth/DeskbarReplicant.cpp 
b/src/servers/bluetooth/DeskbarReplicant.cpp
index 226cd4f6f8..a81a953581 100644
--- a/src/servers/bluetooth/DeskbarReplicant.cpp
+++ b/src/servers/bluetooth/DeskbarReplicant.cpp
@@ -69,10 +69,8 @@ DeskbarReplicant::_Init()
                return;
 
        BResources resources(&file);
-#ifdef HAIKU_TARGET_PLATFORM_HAIKU
        if (resources.InitCheck() < B_OK)
                return;
-#endif
 
        size_t size;
        const void* data = resources.LoadResource(B_VECTOR_ICON_TYPE,


Other related posts:

  • » [haiku-commits] haiku: hrev52081 - in src: add-ons/kernel/drivers/bluetooth/h2/h2generic servers/bluetooth - waddlesplash