[PATCH v5 02/15] PCI/pwrctrl: slot: Rename private struct and pointers for consistency

From: Manivannan Sadhasivam via B4 Relay

Date: Thu Jan 15 2026 - 02:29:11 EST


From: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>

Previously the pwrseq, tc9563, and slot pwrctrl drivers used different
naming conventions for their private data structs and pointers to them,
which makes patches hard to read:

Previous names New names
------------------------------------ ----------------------------------
struct pci_pwrctrl_pwrseq_data { struct pci_pwrctrl_pwrseq {
struct pci_pwrctrl ctx; struct pci_pwrctrl pwrctrl;
struct pci_pwrctrl_pwrseq_data *data struct pci_pwrctrl_pwrseq *pwrseq

struct tc9563_pwrctrl_ctx { struct pci_pwrctrl_tc9563 {
struct tc9563_pwrctrl_ctx *ctx struct pci_pwrctrl_tc9563 *tc9563

struct pci_pwrctrl_slot_data { struct pci_pwrctrl_slot {
struct pci_pwrctrl ctx; struct pci_pwrctrl pwrctrl;
struct pci_pwrctrl_slot_data *slot struct pci_pwrctrl_slot *slot

Rename "struct pci_pwrctrl_slot_data" to "struct pci_pwrctrl_slot".

Rename the "struct pci_pwrctrl ctx" member to "struct pci_pwrctrl pwrctrl".

No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>
---
drivers/pci/pwrctrl/slot.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/pci/pwrctrl/slot.c b/drivers/pci/pwrctrl/slot.c
index 3320494b62d8..5ddae4ae3431 100644
--- a/drivers/pci/pwrctrl/slot.c
+++ b/drivers/pci/pwrctrl/slot.c
@@ -13,15 +13,15 @@
#include <linux/regulator/consumer.h>
#include <linux/slab.h>

-struct pci_pwrctrl_slot_data {
- struct pci_pwrctrl ctx;
+struct pci_pwrctrl_slot {
+ struct pci_pwrctrl pwrctrl;
struct regulator_bulk_data *supplies;
int num_supplies;
};

static void devm_pci_pwrctrl_slot_power_off(void *data)
{
- struct pci_pwrctrl_slot_data *slot = data;
+ struct pci_pwrctrl_slot *slot = data;

regulator_bulk_disable(slot->num_supplies, slot->supplies);
regulator_bulk_free(slot->num_supplies, slot->supplies);
@@ -29,7 +29,7 @@ static void devm_pci_pwrctrl_slot_power_off(void *data)

static int pci_pwrctrl_slot_probe(struct platform_device *pdev)
{
- struct pci_pwrctrl_slot_data *slot;
+ struct pci_pwrctrl_slot *slot;
struct device *dev = &pdev->dev;
struct clk *clk;
int ret;
@@ -64,9 +64,9 @@ static int pci_pwrctrl_slot_probe(struct platform_device *pdev)
"Failed to enable slot clock\n");
}

- pci_pwrctrl_init(&slot->ctx, dev);
+ pci_pwrctrl_init(&slot->pwrctrl, dev);

- ret = devm_pci_pwrctrl_device_set_ready(dev, &slot->ctx);
+ ret = devm_pci_pwrctrl_device_set_ready(dev, &slot->pwrctrl);
if (ret)
return dev_err_probe(dev, ret, "Failed to register pwrctrl driver\n");


--
2.48.1