qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/4] clock: Add ClockEvent parameter to callbacks


From: Peter Maydell
Subject: Re: [PATCH v2 1/4] clock: Add ClockEvent parameter to callbacks
Date: Wed, 10 Feb 2021 22:19:10 +0000

On Wed, 10 Feb 2021 at 20:53, Hao Wu <wuhaotsh@google.com> wrote:
>
>
>
> On Tue, Feb 9, 2021 at 5:24 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>> diff --git a/hw/adc/npcm7xx_adc.c b/hw/adc/npcm7xx_adc.c
>> index 870a6d50c27..573f4876dc6 100644
>> --- a/hw/adc/npcm7xx_adc.c
>> +++ b/hw/adc/npcm7xx_adc.c
>> @@ -238,7 +238,7 @@ static void npcm7xx_adc_init(Object *obj)
>>      memory_region_init_io(&s->iomem, obj, &npcm7xx_adc_ops, s,
>>                            TYPE_NPCM7XX_ADC, 4 * KiB);
>>      sysbus_init_mmio(sbd, &s->iomem);
>> -    s->clock = qdev_init_clock_in(DEVICE(s), "clock", NULL, NULL);
>> +    s->clock = qdev_init_clock_in(DEVICE(s), "clock", NULL, NULL, 
>> ClockUpdate);
>
> Since there's no callback here should it be
>  s->clock = qdev_init_clock_in(DEVICE(s), "clock", NULL, NULL, 0);
> ?

Yes; thanks for the catch. (The function ignores the events argument
if there's no callback function specified, but 0 makes more sense.)

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]