diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-18 16:57:43 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-18 16:57:43 (GMT) |
commit | 4d924d7a81627663720223b5c4330c18d8063fb6 (patch) | |
tree | 6e80c1bc1d2264e8e122d039c126840f63140662 /drivers/usb | |
parent | dba3398381dd1175c74721c97d1daf8fc5939276 (diff) | |
download | linux-4d924d7a81627663720223b5c4330c18d8063fb6.tar.xz |
Revert "usb: interface authorization: SysFS part of USB interface authorization"
This reverts commit 187b3d75bbfba45a38b5d1d3656c0f11f6f6f2d0 as the
signed-off-by address is invalid.
Cc: Stefan Koch <stefan.koch10@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/sysfs.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index d9ec2de..cfc68c1 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c @@ -957,41 +957,6 @@ static ssize_t supports_autosuspend_show(struct device *dev, } static DEVICE_ATTR_RO(supports_autosuspend); -/* - * interface_authorized_show - show authorization status of an USB interface - * 1 is authorized, 0 is deauthorized - */ -static ssize_t interface_authorized_show(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct usb_interface *intf = to_usb_interface(dev); - - return sprintf(buf, "%u\n", intf->authorized); -} - -/* - * interface_authorized_store - authorize or deauthorize an USB interface - */ -static ssize_t interface_authorized_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t count) -{ - struct usb_interface *intf = to_usb_interface(dev); - bool val; - - if (strtobool(buf, &val) != 0) - return -EINVAL; - - if (val) - usb_authorize_interface(intf); - else - usb_deauthorize_interface(intf); - - return count; -} -static struct device_attribute dev_attr_interface_authorized = - __ATTR(authorized, S_IRUGO | S_IWUSR, - interface_authorized_show, interface_authorized_store); - static struct attribute *intf_attrs[] = { &dev_attr_bInterfaceNumber.attr, &dev_attr_bAlternateSetting.attr, @@ -1001,7 +966,6 @@ static struct attribute *intf_attrs[] = { &dev_attr_bInterfaceProtocol.attr, &dev_attr_modalias.attr, &dev_attr_supports_autosuspend.attr, - &dev_attr_interface_authorized.attr, NULL, }; static struct attribute_group intf_attr_grp = { |