On Fri, 3 Sep 2004, Oliver Neukum wrote:

> +       udev = to_usb_device (dev);                                     \
> +       if (!udev->actconfig)                                           \
> +               return 0;                                               \
> +       len = usb_string(udev, udev->actconfig->desc.field, buf, PAGE_SIZE);\
> 
> What will happen if you run this while the configuration is changed?

I don't know :) But there's a similar code just above that exports 
configuration parameters, so I think it should be okay:

/* Active configuration fields */
#define usb_actconfig_show(field, multiplier, format_string)            \
static ssize_t  show_##field (struct device *dev, char *buf)            \
{                                                                       \
        struct usb_device *udev;                                        \
                                                                        \
        udev = to_usb_device (dev);                                     \
        if (udev->actconfig)                                            \
                return sprintf (buf, format_string,                     \
                                udev->actconfig->desc.field * multiplier);      
\
        else                                                            \
                return 0;                                               \
}                                                                       \


-- 
Alexander

Homepage: http://www.sensi.org/~ak/



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to