aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_sysfs.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2013-10-17 13:54:46 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2013-10-17 16:54:07 -0400
commitebd1e33bb2167798197e79d277d7ead14013e489 (patch)
tree8b3619e8b496f390446a72ab58986742e0c71cf6 /net/bluetooth/hci_sysfs.c
parentbaf27f6e0e13b9b7e81fd4c758ac87f165c1a422 (diff)
Bluetooth: Expose auto_accept_delay debugfs only when SSP is supported
The auto_accept_delay debugfs entry is only valid for BR/EDR capable controllers that also support SSP. If SSP is not available or it is a LE-only single mode controller this value has no affect and so do not expose it. Since the value can be actually changed, switch the permissions to 0644 to clearly indicate that the value is indeed writeable. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_sysfs.c')
-rw-r--r--net/bluetooth/hci_sysfs.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 65ecb9e6fdb7..a14196034bab 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -466,35 +466,6 @@ static const struct file_operations uuids_fops = {
466 .release = single_release, 466 .release = single_release,
467}; 467};
468 468
469static int auto_accept_delay_set(void *data, u64 val)
470{
471 struct hci_dev *hdev = data;
472
473 hci_dev_lock(hdev);
474
475 hdev->auto_accept_delay = val;
476
477 hci_dev_unlock(hdev);
478
479 return 0;
480}
481
482static int auto_accept_delay_get(void *data, u64 *val)
483{
484 struct hci_dev *hdev = data;
485
486 hci_dev_lock(hdev);
487
488 *val = hdev->auto_accept_delay;
489
490 hci_dev_unlock(hdev);
491
492 return 0;
493}
494
495DEFINE_SIMPLE_ATTRIBUTE(auto_accept_delay_fops, auto_accept_delay_get,
496 auto_accept_delay_set, "%llu\n");
497
498void hci_init_sysfs(struct hci_dev *hdev) 469void hci_init_sysfs(struct hci_dev *hdev)
499{ 470{
500 struct device *dev = &hdev->dev; 471 struct device *dev = &hdev->dev;
@@ -531,8 +502,6 @@ int hci_add_sysfs(struct hci_dev *hdev)
531 502
532 debugfs_create_file("uuids", 0444, hdev->debugfs, hdev, &uuids_fops); 503 debugfs_create_file("uuids", 0444, hdev->debugfs, hdev, &uuids_fops);
533 504
534 debugfs_create_file("auto_accept_delay", 0444, hdev->debugfs, hdev,
535 &auto_accept_delay_fops);
536 return 0; 505 return 0;
537} 506}
538 507