]> git.baikalelectronics.ru Git - kernel.git/commit
usb: add the concept of default authorization to USB hosts
authorInaky Perez-Gonzalez <inaky@linux.intel.com>
Wed, 1 Aug 2007 03:33:58 +0000 (20:33 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:55:04 +0000 (14:55 -0700)
commitdd762cf6d4d5fc614357fc497f16b89b6e3c79e1
tree6c03da568075d26433432070ddd5f0f0480371e3
parentb03b71f4c17e7ce95ea78ce6d3fecb45131d5d54
usb: add the concept of default authorization to USB hosts

This introduces /sys/bus/devices/usb*/authorized_default; it dictates
what is going to be the default authorization state for devices
connected to the host. User space can set that using the sysfs file.

We hook to the root hub instead of to the device controller as it is
quite easy to get to it in sysfs from the device structure (device
5-4.3 is usb5) vs. backtracking to the controller device.

By default it is set to be 'authorized' (!0) for normal, wired USB
devices and 'unauthorized' (0) for Wireless USB devices.

As suggested by Adrian Bunk, make authorized_default static

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hcd.c
drivers/usb/core/hcd.h