2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
* bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after initialising controller. * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
This commit is contained in:
parent
255a27d434
commit
e23721e8af
3 changed files with 14 additions and 5 deletions
|
@ -152,9 +152,6 @@ grub_ohci_pci_iter (int bus, int device, int func,
|
|||
if (! o)
|
||||
return 1;
|
||||
|
||||
/* Link in the OHCI. */
|
||||
o->next = ohci;
|
||||
ohci = o;
|
||||
o->iobase = (grub_uint32_t *) base;
|
||||
|
||||
/* Reserve memory for the HCCA. */
|
||||
|
@ -190,6 +187,10 @@ grub_ohci_pci_iter (int bus, int device, int func,
|
|||
grub_dprintf ("ohci", "OHCI enable: 0x%02x\n",
|
||||
(grub_ohci_readreg32 (o, GRUB_OHCI_REG_CONTROL) >> 6) & 3);
|
||||
|
||||
/* Link to ohci now that initialisation is successful. */
|
||||
o->next = ohci;
|
||||
ohci = o;
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue