On 09/08/2018 15:27, Emanuele wrote:
> 
>>> +{
>>> +    QSDHCI_PCI *spci = (QSDHCI_PCI *)obj;
>>> +    qpci_device_enable(&spci->dev);
>>> +}
>>> +
>>> +static void sdhci_destroy(QOSGraphObject *obj)
>> "sdhci_pci_destructor()"?
> In general, I called the constructor name  *_create, so in theory to
> keep it consistent the destructor should be *_destroy, no?

Yes, but the field name in QOSGraphObject is "destructor".

You have:

    obj.get_device = XXX_get_device;
    obj.get_driver = XXX_get_driver;
    obj.start_hw   = XXX_start_hw;

So we can expect:

   obj.destructor = XXX_destructor;

Thanks,
Laurent

Reply via email to