diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2015-03-13 13:20:35 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2015-03-13 13:28:36 -0400 |
commit | b7cb93e52839ee44959adabc17c2a17422e6bd4b (patch) | |
tree | 8e00a2b40ace2987f34295f3084edd7fc126181c /net/bluetooth/hci_debugfs.c | |
parent | eacb44dff98559d4682072c0061e1ecb63687e9c (diff) |
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, | |||
679 | struct hci_dev *hdev = file->private_data; | 679 | struct hci_dev *hdev = file->private_data; |
680 | char buf[3]; | 680 | char buf[3]; |
681 | 681 | ||
682 | buf[0] = test_bit(HCI_FORCE_STATIC_ADDR, &hdev->dbg_flags) ? 'Y': 'N'; | 682 | buf[0] = hci_dev_test_flag(hdev, HCI_FORCE_STATIC_ADDR) ? 'Y': 'N'; |
683 | buf[1] = '\n'; | 683 | buf[1] = '\n'; |
684 | buf[2] = '\0'; | 684 | buf[2] = '\0'; |
685 | return simple_read_from_buffer(user_buf, count, ppos, buf, 2); | 685 | 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, | |||
704 | if (strtobool(buf, &enable)) | 704 | if (strtobool(buf, &enable)) |
705 | return -EINVAL; | 705 | return -EINVAL; |
706 | 706 | ||
707 | if (enable == test_bit(HCI_FORCE_STATIC_ADDR, &hdev->dbg_flags)) | 707 | if (enable == hci_dev_test_flag(hdev, HCI_FORCE_STATIC_ADDR)) |
708 | return -EALREADY; | 708 | return -EALREADY; |
709 | 709 | ||
710 | change_bit(HCI_FORCE_STATIC_ADDR, &hdev->dbg_flags); | 710 | hci_dev_change_flag(hdev, HCI_FORCE_STATIC_ADDR); |
711 | 711 | ||
712 | return count; | 712 | return count; |
713 | } | 713 | } |