Bluetooth: Merge hdev->dbg_flags fields into hdev->dev_flags
With the extension of hdev->dev_flags utilizing a bitmap now, the space is no longer restricted. Merge the hdev->dbg_flags into hdev->dev_flags to save space on 64-bit architectures. On 32-bit architectures no size reduction happens. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
committed by
Johan Hedberg
parent
eacb44dff9
commit
b7cb93e528
@@ -679,7 +679,7 @@ static ssize_t force_static_address_read(struct file *file,
|
||||
struct hci_dev *hdev = file->private_data;
|
||||
char buf[3];
|
||||
|
||||
buf[0] = test_bit(HCI_FORCE_STATIC_ADDR, &hdev->dbg_flags) ? 'Y': 'N';
|
||||
buf[0] = hci_dev_test_flag(hdev, HCI_FORCE_STATIC_ADDR) ? 'Y': 'N';
|
||||
buf[1] = '\n';
|
||||
buf[2] = '\0';
|
||||
return simple_read_from_buffer(user_buf, count, ppos, buf, 2);
|
||||
@@ -704,10 +704,10 @@ static ssize_t force_static_address_write(struct file *file,
|
||||
if (strtobool(buf, &enable))
|
||||
return -EINVAL;
|
||||
|
||||
if (enable == test_bit(HCI_FORCE_STATIC_ADDR, &hdev->dbg_flags))
|
||||
if (enable == hci_dev_test_flag(hdev, HCI_FORCE_STATIC_ADDR))
|
||||
return -EALREADY;
|
||||
|
||||
change_bit(HCI_FORCE_STATIC_ADDR, &hdev->dbg_flags);
|
||||
hci_dev_change_flag(hdev, HCI_FORCE_STATIC_ADDR);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user