[PATCH 2/2] Use of_get_pci_dev_node() in axon_msi.c

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Oct 17 21:36:30 EST 2007


> I find it ironic that you add of_get_pci_dev_node() as a function
> which gets the node and grabs a reference to it, and then the very
> first usage you make of it doesn't drop the reference at all.
> 
> That reference grabbing aspect of the new interface is obviously very
> useful! :-)
> 
> Kidding aside (I realize that in this case probably the driver never
> unregisters and therefore the reference never needs to be released)
> it's really much nicer to add facilities when you have patches in hand
> that actually use them.

I think in this case, it's mostly a matter of consistency... pretty much
everything that returns a device_node grabs a reference... except
pci_device_to_OF_node :-)

I think Michael is trying to address that, and axon-msi happens to be
something he wrote so a good candidate for an initial conversion :-)

Cheers,
Ben.





More information about the Linuxppc-dev mailing list