diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2015-03-13 10:20:35 -0700 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2015-03-13 19:28:36 +0200 |
commit | b7cb93e52839ee44959adabc17c2a17422e6bd4b (patch) | |
tree | 8e00a2b40ace2987f34295f3084edd7fc126181c /net/bluetooth/hci_debugfs.c | |
parent | eacb44dff98559d4682072c0061e1ecb63687e9c (diff) | |
download | lwn-b7cb93e52839ee44959adabc17c2a17422e6bd4b.tar.gz lwn-b7cb93e52839ee44959adabc17c2a17422e6bd4b.zip |
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>
Diffstat (limited to 'net/bluetooth/hci_debugfs.c')
-rw-r--r-- | net/bluetooth/hci_debugfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/hci_debugfs.c b/net/bluetooth/hci_debugfs.c index 3c025ee5572c..bc801e9db834 100644 --- a/net/bluetooth/hci_debugfs.c +++ b/net/bluetooth/hci_debugfs.c @@ -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; } |