usb.c (3e4d27b06d7484040355e22eec2cbce7335d6dab) usb.c (c60795f41d37600b6ebd79ec99252ec2f5efecd4)
1/*
2 *
3 * Most of this source has been derived from the Linux USB
4 * project:
5 * (C) Copyright Linus Torvalds 1999
6 * (C) Copyright Johannes Erdfelt 1999-2001
7 * (C) Copyright Andreas Gal 1999
8 * (C) Copyright Gregory P. Smith 1999

--- 478 unchanged lines hidden (view full) ---

487/**********************************************************************
488 * gets configuration cfgno and store it in the buffer
489 */
490int usb_get_configuration_no(struct usb_device *dev,
491 unsigned char *buffer, int cfgno)
492{
493 int result;
494 unsigned int tmp;
1/*
2 *
3 * Most of this source has been derived from the Linux USB
4 * project:
5 * (C) Copyright Linus Torvalds 1999
6 * (C) Copyright Johannes Erdfelt 1999-2001
7 * (C) Copyright Andreas Gal 1999
8 * (C) Copyright Gregory P. Smith 1999

--- 478 unchanged lines hidden (view full) ---

487/**********************************************************************
488 * gets configuration cfgno and store it in the buffer
489 */
490int usb_get_configuration_no(struct usb_device *dev,
491 unsigned char *buffer, int cfgno)
492{
493 int result;
494 unsigned int tmp;
495 struct usb_configuration_descriptor *config;
495 struct usb_config_descriptor *config;
496
496
497 config = (struct usb_configuration_descriptor *)&buffer[0];
497 config = (struct usb_config_descriptor *)&buffer[0];
498 result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno, buffer, 9);
499 if (result < 9) {
500 if (result < 0)
501 printf("unable to get descriptor, error %lX\n",
502 dev->status);
503 else
504 printf("config descriptor too short " \
505 "(expected %i, got %i)\n", 9, result);

--- 482 unchanged lines hidden ---
498 result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno, buffer, 9);
499 if (result < 9) {
500 if (result < 0)
501 printf("unable to get descriptor, error %lX\n",
502 dev->status);
503 else
504 printf("config descriptor too short " \
505 "(expected %i, got %i)\n", 9, result);

--- 482 unchanged lines hidden ---