mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-25 21:24:16 +08:00
Remove unused discoverable variables from adapter code
This commit is contained in:
parent
582d84646d
commit
04ff02f9bb
@ -474,13 +474,10 @@ static int set_mode(struct btd_adapter *adapter, uint8_t new_mode,
|
||||
{
|
||||
int err;
|
||||
const char *modestr;
|
||||
gboolean discoverable;
|
||||
|
||||
if (adapter->pending_mode != NULL)
|
||||
return -EALREADY;
|
||||
|
||||
discoverable = new_mode == MODE_DISCOVERABLE;
|
||||
|
||||
if (!adapter->up && new_mode != MODE_OFF) {
|
||||
err = adapter_ops->set_powered(adapter->dev_id, TRUE);
|
||||
if (err < 0)
|
||||
@ -3400,7 +3397,6 @@ gboolean adapter_powering_down(struct btd_adapter *adapter)
|
||||
int btd_adapter_restore_powered(struct btd_adapter *adapter)
|
||||
{
|
||||
char mode[14], address[18];
|
||||
gboolean discoverable;
|
||||
|
||||
if (!adapter_ops)
|
||||
return -EINVAL;
|
||||
@ -3416,8 +3412,6 @@ int btd_adapter_restore_powered(struct btd_adapter *adapter)
|
||||
g_str_equal(mode, "off"))
|
||||
return 0;
|
||||
|
||||
discoverable = get_mode(&adapter->bdaddr, mode) == MODE_DISCOVERABLE;
|
||||
|
||||
return adapter_ops->set_powered(adapter->dev_id, TRUE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user