The managed resource API
Posted Feb 22, 2007 15:19 UTC (Thu) by nix
Parent article: The managed resource API
It seems odd that an ease-of-use interface like the pcim_*() interface provides only partial coverage of the interfaces it's supposed to replace. Users are supposed to remember to use e.g. pci_disable_device(), but if they do the orthogonal thing and use pci_enable_device() as well, they've just introduced a bug.
Surely the sensible thing to do is to have an inline wrapper that introduces pcim_disable_device() that just thunks to pci_disable_device() (and so on for other non-covered functions in this set)? This wouldn't introduce any extra overhead, and would increase consistency.
to post comments)