Skip to content

Commit

Permalink
pci: pcie-phytium-ep: Convert to platform remove callback returning void
Browse files Browse the repository at this point in the history
0edb555: platform: Make platform_driver::remove() return void
cause build error, so convert .remove from int to void

Log:
drivers/pci/controller/pcie-phytium-ep.c:462:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
  462 |         .remove = phytium_pcie_ep_remove,
      |                   ^~~~~~~~~~~~~~~~~~~~~~
drivers/pci/controller/pcie-phytium-ep.c:462:19: note: (near initialization for ‘phytium_pcie_ep_driver.<anonymous>.remove’)
  • Loading branch information
opsiff authored and MingcongBai committed Nov 14, 2024
1 parent c6924d5 commit d14942d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/pci/controller/pcie-phytium-ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,15 +437,13 @@ static int phytium_pcie_ep_probe(struct platform_device *pdev)
return ret;
}

static int phytium_pcie_ep_remove(struct platform_device *pdev)
static void phytium_pcie_ep_remove(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct phytium_pcie_ep *priv = dev_get_drvdata(dev);
struct pci_epc *epc = priv->epc;

pci_epc_mem_exit(epc);

return 0;
}

static const struct of_device_id phytium_pcie_ep_of_match[] = {
Expand Down

0 comments on commit d14942d

Please sign in to comment.