]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: endpoint: Populate func_no before calling pci_epc_add_epf()
authorNiklas Cassel <niklas.cassel@axis.com>
Thu, 14 Dec 2017 13:01:45 +0000 (14:01 +0100)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 19 Dec 2017 11:05:44 +0000 (11:05 +0000)
commitec469a14dc05a6016330f5d954ad760affdf5e90
treecc2ea9f57c307359afbff21f465cbd36b9740b6e
parent95c089e78ff502fb955169b0e983873cf6150311
PCI: endpoint: Populate func_no before calling pci_epc_add_epf()

func_no is a member of struct pci_epf.

Since struct pci_epf is used as an argument to pci_epc_add_epf() (to
bind an endpoint function to a controller), struct pci_epf.func_no
should be populated before calling pci_epc_add_epf().

Initialize the struct pci_epf.func_no member before calling
pci_epc_add_epf(), to fix the endpoint function binding to
an endpoint controller.

Fixes: 196afe67aea9 ("PCI: endpoint: Introduce configfs entry for configuring EP functions")
Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
[lorenzo.pieralisi@arm.com: rewrote the commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Suggested-by: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/pci/endpoint/pci-ep-cfs.c