Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: pci-epf-test: Register notifier if only core_init_notifier is enabled

The pci_epf_test_notifier function should be installed also if only
core_init_notifier is enabled. Fix the current logic.

Link: https://lore.kernel.org/r/20220825090101.20474-1-hayashi.kunihiko@socionext.com
Fixes: 5e50ee27d4a5 ("PCI: pci-epf-test: Add support to defer core initialization")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Acked-by: Om Prakash Singh <omp@nvidia.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Kunihiko Hayashi and committed by
Lorenzo Pieralisi
6acd25cc 9abf2313

+1 -1
+1 -1
drivers/pci/endpoint/functions/pci-epf-test.c
··· 979 979 if (ret) 980 980 epf_test->dma_supported = false; 981 981 982 - if (linkup_notifier) { 982 + if (linkup_notifier || core_init_notifier) { 983 983 epf->nb.notifier_call = pci_epf_test_notifier; 984 984 pci_epc_register_notifier(epc, &epf->nb); 985 985 } else {