mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
hw/isa/isa-bus: cleanup irq functions
The irq number is unsigned; we reject negative values. But -1 is used for the isairq array, which is declared unsigned! And since we have a definition for the number of ISA IRQs, use it. Based on a patch by Philippe Mathieu-Daudé. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
14a1bb48ea
commit
3c29e18841
2 changed files with 11 additions and 8 deletions
|
@ -88,7 +88,7 @@ struct ISADevice {
|
|||
DeviceState parent_obj;
|
||||
/*< public >*/
|
||||
|
||||
uint32_t isairq[2];
|
||||
int8_t isairq[2]; /* -1 = unassigned */
|
||||
int nirqs;
|
||||
int ioport_id;
|
||||
};
|
||||
|
@ -96,9 +96,9 @@ struct ISADevice {
|
|||
ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space,
|
||||
MemoryRegion *address_space_io, Error **errp);
|
||||
void isa_bus_irqs(ISABus *bus, qemu_irq *irqs);
|
||||
qemu_irq isa_get_irq(ISADevice *dev, int isairq);
|
||||
void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq);
|
||||
void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, int isairq);
|
||||
qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq);
|
||||
void isa_init_irq(ISADevice *dev, qemu_irq *p, unsigned isairq);
|
||||
void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq);
|
||||
void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16);
|
||||
IsaDma *isa_get_dma(ISABus *bus, int nchan);
|
||||
MemoryRegion *isa_address_space(ISADevice *dev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue