On Tue, Jul 10, 2007 at 12:45:02PM -0700, [EMAIL PROTECTED] wrote:
> This introduces /sys/class/usb_host/*/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.
> 
> By default it is set to be 'authorized' (!0) for normal, wired USB
> devices and 'unauthorized' (0) for Wireless USB devices.
> 
> Signed-off-by: Inaky Perez-Gonzalez <[EMAIL PROTECTED]>
> 
> ---
>  drivers/usb/core/hcd.c |   53 
> ++++++++++++++++++++++++++++++++++++++++++++++++-
>  drivers/usb/core/hcd.h |    9 +++++++-
>  2 files changed, 60 insertions(+), 2 deletions(-)
> 
> Index: linux.hg/drivers/usb/core/hcd.c
> ===================================================================
> --- linux.hg.orig/drivers/usb/core/hcd.c      2007-07-09 15:32:05.000000000 
> -0700
> +++ linux.hg/drivers/usb/core/hcd.c   2007-07-09 15:35:24.000000000 -0700
> @@ -666,6 +666,57 @@
>       return 0;
>  }
>  
> +
> +
> +/*
> + * Show & store the current value of authorized_default
> + */
> +static
> +ssize_t usb_host_authorized_default_show(struct class_device *dev, char *buf)
> +{
> +     struct usb_bus *usb_bus = class_get_devdata(dev);
> +     struct usb_hcd *usb_hcd = container_of(usb_bus, struct usb_hcd, self);
> +     return snprintf(buf, PAGE_SIZE, "%u\n", usb_hcd->authorized_default);
> +}

I'm currently trying _really_ hard to just drop the whole
/sys/class/usb_host/ stuff entirely as no one currently uses it other
than for debugging stuff.

So I'd really prefer to not add new stuff here that I'll just have to
rip out in a few weeks anyway.

Is there any where else you can add this?  Does this really need to be
on a per-host-controller basis?  If so, just add it to the host
controller device itself, not in this class_device.

thanks,

greg k-h

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to