Skip to content

Commit 5009696

Browse files
moonlinuxkwilczynski
authored andcommitted
PCI: rockchip: Refactor rockchip_pcie_disable_clocks() signature
Refactor rockchip_pcie_disable_clocks() to accept a struct rockchip_pcie pointer instead of a void pointer thus improving type safety and code readability by explicitly specifying the expected data type. Link: https://lore.kernel.org/r/20241202151150.7393-4-linux.amoon@gmail.com Signed-off-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
1 parent 1871593 commit 5009696

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

drivers/pci/controller/pcie-rockchip.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,8 @@ int rockchip_pcie_enable_clocks(struct rockchip_pcie *rockchip)
270270
}
271271
EXPORT_SYMBOL_GPL(rockchip_pcie_enable_clocks);
272272

273-
void rockchip_pcie_disable_clocks(void *data)
273+
void rockchip_pcie_disable_clocks(struct rockchip_pcie *rockchip)
274274
{
275-
struct rockchip_pcie *rockchip = data;
276275

277276
clk_bulk_disable_unprepare(rockchip->num_clks, rockchip->clks);
278277
}

drivers/pci/controller/pcie-rockchip.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ int rockchip_pcie_init_port(struct rockchip_pcie *rockchip);
369369
int rockchip_pcie_get_phys(struct rockchip_pcie *rockchip);
370370
void rockchip_pcie_deinit_phys(struct rockchip_pcie *rockchip);
371371
int rockchip_pcie_enable_clocks(struct rockchip_pcie *rockchip);
372-
void rockchip_pcie_disable_clocks(void *data);
372+
void rockchip_pcie_disable_clocks(struct rockchip_pcie *rockchip);
373373
void rockchip_pcie_cfg_configuration_accesses(
374374
struct rockchip_pcie *rockchip, u32 type);
375375

0 commit comments

Comments
 (0)