diff mbox

[3/6] isa: add isa_bus_from_device() method

Message ID 1331995186-18507-4-git-send-email-hpoussin@reactos.org
State New
Headers show

Commit Message

Hervé Poussineau March 17, 2012, 2:39 p.m. UTC
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
 hw/isa.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Comments

Andreas Färber April 14, 2012, 11:39 a.m. UTC | #1
Am 17.03.2012 15:39, schrieb Hervé Poussineau:
> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
> ---
>  hw/isa.h |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/isa.h b/hw/isa.h
> index 40373fb..f7bc4b5 100644
> --- a/hw/isa.h
> +++ b/hw/isa.h
> @@ -76,6 +76,11 @@ void isa_register_portio_list(ISADevice *dev, uint16_t start,
>                                const MemoryRegionPortio *portio,
>                                void *opaque, const char *name);
>  
> +static inline ISABus *isa_bus_from_device(ISADevice *d)
> +{
> +    return DO_UPCAST(ISABus, qbus, d->qdev.parent_bus);
> +}
> +
>  extern target_phys_addr_t isa_mem_base;
>  
>  void isa_mmio_setup(MemoryRegion *mr, target_phys_addr_t size);

Looks fairly trivial to me and builds fine.

Gerd, can you ack? I'll apply it to the PReP tree then.

Andreas
Gerd Hoffmann April 16, 2012, 7:32 a.m. UTC | #2
On 04/14/12 13:39, Andreas Färber wrote:
> Am 17.03.2012 15:39, schrieb Hervé Poussineau:
>> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
>> ---
>>  hw/isa.h |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/hw/isa.h b/hw/isa.h
>> index 40373fb..f7bc4b5 100644
>> --- a/hw/isa.h
>> +++ b/hw/isa.h
>> @@ -76,6 +76,11 @@ void isa_register_portio_list(ISADevice *dev, uint16_t start,
>>                                const MemoryRegionPortio *portio,
>>                                void *opaque, const char *name);
>>  
>> +static inline ISABus *isa_bus_from_device(ISADevice *d)
>> +{
>> +    return DO_UPCAST(ISABus, qbus, d->qdev.parent_bus);
>> +}
>> +
>>  extern target_phys_addr_t isa_mem_base;
>>  
>>  void isa_mmio_setup(MemoryRegion *mr, target_phys_addr_t size);
> 
> Looks fairly trivial to me and builds fine.
> 
> Gerd, can you ack? I'll apply it to the PReP tree then.
> 
> Andreas

Acked-by: Gerd Hoffmann <kraxel@redhat.com>

cheers,
  Gerd
Andreas Färber April 16, 2012, 11:29 a.m. UTC | #3
Am 16.04.2012 09:32, schrieb Gerd Hoffmann:
> On 04/14/12 13:39, Andreas Färber wrote:
>> Am 17.03.2012 15:39, schrieb Hervé Poussineau:
>>> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
>>> ---
>>>  hw/isa.h |    5 +++++
>>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/hw/isa.h b/hw/isa.h
>>> index 40373fb..f7bc4b5 100644
>>> --- a/hw/isa.h
>>> +++ b/hw/isa.h
>>> @@ -76,6 +76,11 @@ void isa_register_portio_list(ISADevice *dev, uint16_t start,
>>>                                const MemoryRegionPortio *portio,
>>>                                void *opaque, const char *name);
>>>  
>>> +static inline ISABus *isa_bus_from_device(ISADevice *d)
>>> +{
>>> +    return DO_UPCAST(ISABus, qbus, d->qdev.parent_bus);
>>> +}
>>> +
>>>  extern target_phys_addr_t isa_mem_base;
>>>  
>>>  void isa_mmio_setup(MemoryRegion *mr, target_phys_addr_t size);
>>
>> Looks fairly trivial to me and builds fine.
>>
>> Gerd, can you ack? I'll apply it to the PReP tree then.
> 
> Acked-by: Gerd Hoffmann <kraxel@redhat.com>

Thanks, applied to prep-up:
http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/prep-up

Andreas
diff mbox

Patch

diff --git a/hw/isa.h b/hw/isa.h
index 40373fb..f7bc4b5 100644
--- a/hw/isa.h
+++ b/hw/isa.h
@@ -76,6 +76,11 @@  void isa_register_portio_list(ISADevice *dev, uint16_t start,
                               const MemoryRegionPortio *portio,
                               void *opaque, const char *name);
 
+static inline ISABus *isa_bus_from_device(ISADevice *d)
+{
+    return DO_UPCAST(ISABus, qbus, d->qdev.parent_bus);
+}
+
 extern target_phys_addr_t isa_mem_base;
 
 void isa_mmio_setup(MemoryRegion *mr, target_phys_addr_t size);