pci: Add a function to find a device by class