.../serial/common.c - added missing configuration

This commit is contained in:
starous 2010-09-21 22:00:44 +02:00
commit a93cb8a8cc
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2010-09-21 Aleš Nesrsta <starous@volny.cz>
* grub-core/bus/usb/serial/common.c (grub_usbserial_attach):
Added missing configuration of USB device.
2010-09-21 Colin Watson <cjwatson@ubuntu.com>
* grub-core/normal/menu_entry.c (run): Make sure we always return

View file

@ -44,6 +44,7 @@ grub_usbserial_attach (grub_usb_device_t usbdev, int configno, int interfno,
struct grub_serial_port *port;
int j;
struct grub_usb_desc_if *interf;
grub_usb_err_t err = GRUB_USB_ERR_NONE;
interf = usbdev->config[configno].interf[interfno].descif;
@ -80,7 +81,12 @@ grub_usbserial_attach (grub_usb_device_t usbdev, int configno, int interfno,
port->out_endp = endp;
}
}
if (!port->out_endp || !port->in_endp)
/* Configure device */
if (port->out_endp && port->in_endp)
err = grub_usb_set_configuration (usbdev, configno + 1);
if (!port->out_endp || !port->in_endp || err)
{
grub_free (port->name);
grub_free (port);