• Niklas Schnelle's avatar
    s390/pci: rename get_zdev_by_bus() to zdev_from_bus() · 7dcfe50f
    Niklas Schnelle authored
    Getting a zpci_dev via get_zdev_by_bus() uses the long lived reference
    held in zbus->function[devfn]. This is accounted for in
    pcibios_add_device() and pcibios_release_device().
    
    Therefore there is no need to increment the reference count in
    get_zdev_by_bus() as is done for get_zdev_by_fid(). Instead callers must
    not access the device after pcibios_release_device() was called which is
    necessary for common PCI code anyway. With this though the very similar
    naming may be misleading so rename get_zdev_by_bus() to zdev_from_bus()
    emphasizing that we are directly referencing the zdev via the bus.
    Reviewed-by: default avatarMatthew Rosato <mjrosato@linux.ibm.com>
    Signed-off-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
    Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
    7dcfe50f
pci.c 27.8 KB