[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] m25p80: provide a realize to support late inits
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-devel] [PATCH] m25p80: provide a realize to support late inits. |
Date: |
Wed, 15 Jun 2016 16:09:24 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 |
On 06/15/2016 04:07 PM, Peter Maydell wrote:
> On 15 June 2016 at 15:00, Cédric Le Goater <address@hidden> wrote:
>> We also need to realize() the SSISlave part of the object. This is why
>> the previous realize() ops is stored in M25P80Class and called in the
>> object realize() ops.
>>
>> This is fully compatible with the existing users of m25p80 and it
>> provides a way to handle errors on the drive backend.
>>
>> Signed-off-by: Cédric Le Goater <address@hidden>
>> ---
>
>> +static void m25p80_realize(DeviceState *dev, Error **errp)
>> +{
>> + Flash *s = M25P80(dev);
>> + M25P80Class *mc = M25P80_GET_CLASS(s);
>> + DriveInfo *dinfo;
>> +
>> + /* initialize the SSISlave part */
>> + mc->parent_dc_realize(dev, errp);
>>
>> - /* FIXME use a qdev drive property instead of drive_get_next() */
>> dinfo = drive_get_next(IF_MTD);
>
> Why have you removed the FIXME comment ?
This is an error. I should not have removed this one. Only the one related
on late-init :/
C.