Skip to content

Commit

Permalink
PCI: rockchip: Refactor rockchip_pcie_disable_clocks() signature
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Anand Moon authored and Krzysztof Wilczyński committed Jan 15, 2025
1 parent 1871593 commit 5009696
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions drivers/pci/controller/pcie-rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,8 @@ int rockchip_pcie_enable_clocks(struct rockchip_pcie *rockchip)
}
EXPORT_SYMBOL_GPL(rockchip_pcie_enable_clocks);

void rockchip_pcie_disable_clocks(void *data)
void rockchip_pcie_disable_clocks(struct rockchip_pcie *rockchip)
{
struct rockchip_pcie *rockchip = data;

clk_bulk_disable_unprepare(rockchip->num_clks, rockchip->clks);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/pci/controller/pcie-rockchip.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ int rockchip_pcie_init_port(struct rockchip_pcie *rockchip);
int rockchip_pcie_get_phys(struct rockchip_pcie *rockchip);
void rockchip_pcie_deinit_phys(struct rockchip_pcie *rockchip);
int rockchip_pcie_enable_clocks(struct rockchip_pcie *rockchip);
void rockchip_pcie_disable_clocks(void *data);
void rockchip_pcie_disable_clocks(struct rockchip_pcie *rockchip);
void rockchip_pcie_cfg_configuration_accesses(
struct rockchip_pcie *rockchip, u32 type);

Expand Down

0 comments on commit 5009696

Please sign in to comment.