]> www.infradead.org Git - users/willy/xarray.git/commitdiff
PCI: endpoint: Rename core_init() callback in 'struct pci_epc_event_ops' to epc_init()
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Tue, 30 Apr 2024 06:13:43 +0000 (11:43 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 28 May 2024 16:13:48 +0000 (11:13 -0500)
core_init() callback is used to notify the EPC initialization event to the
EPF drivers. The 'core' prefix was used indicate that the controller IP
core has completed initialization. But it serves no purpose as the EPF
driver will only care about the EPC initialization as a whole and there is
no real benefit to distinguish the IP core part.

Rename the core_init() callback in 'struct pci_epc_event_ops' to epc_init()
to make it more clear.

Link: https://lore.kernel.org/linux-pci/20240430-pci-epf-rework-v4-2-22832d0d456f@linaro.org
Tested-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
drivers/pci/endpoint/functions/pci-epf-mhi.c
drivers/pci/endpoint/functions/pci-epf-test.c
drivers/pci/endpoint/pci-epc-core.c
include/linux/pci-epf.h

index 2c54d80107cf3cb0c8c6a0de5964ea1e6b6c1b67..95c3206f609fe959192849f93db503ab53ce3288 100644 (file)
@@ -716,7 +716,7 @@ static void pci_epf_mhi_dma_deinit(struct pci_epf_mhi *epf_mhi)
        epf_mhi->dma_chan_rx = NULL;
 }
 
-static int pci_epf_mhi_core_init(struct pci_epf *epf)
+static int pci_epf_mhi_epc_init(struct pci_epf *epf)
 {
        struct pci_epf_mhi *epf_mhi = epf_get_drvdata(epf);
        const struct pci_epf_mhi_ep_info *info = epf_mhi->info;
@@ -897,7 +897,7 @@ static void pci_epf_mhi_unbind(struct pci_epf *epf)
 }
 
 static const struct pci_epc_event_ops pci_epf_mhi_event_ops = {
-       .core_init = pci_epf_mhi_core_init,
+       .epc_init = pci_epf_mhi_epc_init,
        .link_up = pci_epf_mhi_link_up,
        .link_down = pci_epf_mhi_link_down,
        .bme = pci_epf_mhi_bme,
index 3de18a601e7b5f0136aa4a57c6b148c2c8b84011..191aee61703f8d916d0bb6339415294e284d9ffc 100644 (file)
@@ -731,7 +731,7 @@ static int pci_epf_test_set_bar(struct pci_epf *epf)
        return 0;
 }
 
-static int pci_epf_test_core_init(struct pci_epf *epf)
+static int pci_epf_test_epc_init(struct pci_epf *epf)
 {
        struct pci_epf_test *epf_test = epf_get_drvdata(epf);
        struct pci_epf_header *header = epf->header;
@@ -791,7 +791,7 @@ static int pci_epf_test_link_up(struct pci_epf *epf)
 }
 
 static const struct pci_epc_event_ops pci_epf_test_event_ops = {
-       .core_init = pci_epf_test_core_init,
+       .epc_init = pci_epf_test_epc_init,
        .link_up = pci_epf_test_link_up,
 };
 
index 47d27ec7439d94acca83e4beb427bf1c82d64320..e6bffa37a9488302092c8f50db4d3dc688d0df4c 100644 (file)
@@ -727,9 +727,9 @@ void pci_epc_linkdown(struct pci_epc *epc)
 EXPORT_SYMBOL_GPL(pci_epc_linkdown);
 
 /**
- * pci_epc_init_notify() - Notify the EPF device that EPC device's core
- *                        initialization is completed.
- * @epc: the EPC device whose core initialization is completed
+ * pci_epc_init_notify() - Notify the EPF device that EPC device initialization
+ *                         is completed.
+ * @epc: the EPC device whose initialization is completed
  *
  * Invoke to Notify the EPF device that the EPC device's initialization
  * is completed.
@@ -744,8 +744,8 @@ void pci_epc_init_notify(struct pci_epc *epc)
        mutex_lock(&epc->list_lock);
        list_for_each_entry(epf, &epc->pci_epf, list) {
                mutex_lock(&epf->lock);
-               if (epf->event_ops && epf->event_ops->core_init)
-                       epf->event_ops->core_init(epf);
+               if (epf->event_ops && epf->event_ops->epc_init)
+                       epf->event_ops->epc_init(epf);
                mutex_unlock(&epf->lock);
        }
        epc->init_complete = true;
@@ -756,7 +756,7 @@ EXPORT_SYMBOL_GPL(pci_epc_init_notify);
 /**
  * pci_epc_notify_pending_init() - Notify the pending EPC device initialization
  *                                 complete to the EPF device
- * @epc: the EPC device whose core initialization is pending to be notified
+ * @epc: the EPC device whose initialization is pending to be notified
  * @epf: the EPF device to be notified
  *
  * Invoke to notify the pending EPC device initialization complete to the EPF
@@ -767,8 +767,8 @@ void pci_epc_notify_pending_init(struct pci_epc *epc, struct pci_epf *epf)
 {
        if (epc->init_complete) {
                mutex_lock(&epf->lock);
-               if (epf->event_ops && epf->event_ops->core_init)
-                       epf->event_ops->core_init(epf);
+               if (epf->event_ops && epf->event_ops->epc_init)
+                       epf->event_ops->epc_init(epf);
                mutex_unlock(&epf->lock);
        }
 }
index adee6a1b35db70e50fa2b95bda6a0fb3632e4f75..afe3bfd88742b10ab17604acd0d1ec738faeedff 100644 (file)
@@ -70,13 +70,13 @@ struct pci_epf_ops {
 
 /**
  * struct pci_epc_event_ops - Callbacks for capturing the EPC events
- * @core_init: Callback for the EPC initialization complete event
+ * @epc_init: Callback for the EPC initialization complete event
  * @link_up: Callback for the EPC link up event
  * @link_down: Callback for the EPC link down event
  * @bme: Callback for the EPC BME (Bus Master Enable) event
  */
 struct pci_epc_event_ops {
-       int (*core_init)(struct pci_epf *epf);
+       int (*epc_init)(struct pci_epf *epf);
        int (*link_up)(struct pci_epf *epf);
        int (*link_down)(struct pci_epf *epf);
        int (*bme)(struct pci_epf *epf);