Bluetooth: hci_core: cleanup struct hci_dev
authorDmitry Antipov <dmantipov@yandex.ru>
Fri, 21 Jun 2024 13:01:55 +0000 (16:01 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 15 Jul 2024 14:11:19 +0000 (10:11 -0400)
Remove unused and set but otherwise unused 'discovery_old_state'
and 'sco_last_tx' members of 'struct hci_dev'. The first one is
a leftover after commit 182ee45da083 ("Bluetooth: hci_sync: Rework
hci_suspend_notifier"); the second one is originated from ancient
2.4.19 and I was unable to find any actual use since that.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_sync.c

index eaeaf3dc07aa0fe78abf1a15f4e35e518577ffd1..31020891fc68cde232075f41ba8f3df26e1067ac 100644 (file)
@@ -476,7 +476,6 @@ struct hci_dev {
        unsigned int    iso_pkts;
 
        unsigned long   acl_last_tx;
-       unsigned long   sco_last_tx;
        unsigned long   le_last_tx;
 
        __u8            le_tx_def_phys;
@@ -528,7 +527,6 @@ struct hci_dev {
 
        struct discovery_state  discovery;
 
-       int                     discovery_old_state;
        bool                    discovery_paused;
        int                     advertising_old_state;
        bool                    advertising_paused;
index ccad43f104158d1246c6b007878ed76a485f24b9..76b283b8e90d34cd1f47996e3e0d2d15fc7d066e 100644 (file)
@@ -5853,7 +5853,6 @@ static int hci_pause_discovery_sync(struct hci_dev *hdev)
                return err;
 
        hdev->discovery_paused = true;
-       hdev->discovery_old_state = old_state;
        hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
 
        return 0;