mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
usb/uhci: Misc clean up
Fix a comment for coding style so subsequent patch will not get checkpatch error and simplify and shorten uhci_update_irq(). Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <b68a57dfcf181e73272b4dc951f8cc6e76b0d182.1635161629.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This commit is contained in:
parent
675cf7817c
commit
d3647ef1fd
1 changed files with 2 additions and 5 deletions
|
@ -290,7 +290,7 @@ static UHCIAsync *uhci_async_find_td(UHCIState *s, uint32_t td_addr)
|
||||||
|
|
||||||
static void uhci_update_irq(UHCIState *s)
|
static void uhci_update_irq(UHCIState *s)
|
||||||
{
|
{
|
||||||
int level;
|
int level = 0;
|
||||||
if (((s->status2 & 1) && (s->intr & (1 << 2))) ||
|
if (((s->status2 & 1) && (s->intr & (1 << 2))) ||
|
||||||
((s->status2 & 2) && (s->intr & (1 << 3))) ||
|
((s->status2 & 2) && (s->intr & (1 << 3))) ||
|
||||||
((s->status & UHCI_STS_USBERR) && (s->intr & (1 << 0))) ||
|
((s->status & UHCI_STS_USBERR) && (s->intr & (1 << 0))) ||
|
||||||
|
@ -298,8 +298,6 @@ static void uhci_update_irq(UHCIState *s)
|
||||||
(s->status & UHCI_STS_HSERR) ||
|
(s->status & UHCI_STS_HSERR) ||
|
||||||
(s->status & UHCI_STS_HCPERR)) {
|
(s->status & UHCI_STS_HCPERR)) {
|
||||||
level = 1;
|
level = 1;
|
||||||
} else {
|
|
||||||
level = 0;
|
|
||||||
}
|
}
|
||||||
pci_set_irq(&s->dev, level);
|
pci_set_irq(&s->dev, level);
|
||||||
}
|
}
|
||||||
|
@ -1170,8 +1168,7 @@ void usb_uhci_common_realize(PCIDevice *dev, Error **errp)
|
||||||
|
|
||||||
pci_conf[PCI_CLASS_PROG] = 0x00;
|
pci_conf[PCI_CLASS_PROG] = 0x00;
|
||||||
/* TODO: reset value should be 0. */
|
/* TODO: reset value should be 0. */
|
||||||
pci_conf[USB_SBRN] = USB_RELEASE_1; // release number
|
pci_conf[USB_SBRN] = USB_RELEASE_1; /* release number */
|
||||||
|
|
||||||
pci_config_set_interrupt_pin(pci_conf, u->info.irq_pin + 1);
|
pci_config_set_interrupt_pin(pci_conf, u->info.irq_pin + 1);
|
||||||
|
|
||||||
if (s->masterbus) {
|
if (s->masterbus) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue