/*
* ->inherits must be the last field and all the preceding
* fields must be pointers.
*/
The structs are then initialized with .inherits assigned first:
drivers/ata/sata_nv.c:475
static struct ata_port_operations nv_nf2_ops = {
.inherits = &nv_generic_ops,
.freeze = nv_nf2_freeze,
.thaw = nv_nf2_thaw,
};
Is this actually implementing inheritance? Why do all preceding fields need to be pointers?
As far as I can tell, this style is only found in the ata drivers.
Could anyone explain how this works?
Thanks,
Peter
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies