lkml.org 
[lkml]   [2021]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v10 4/5] PCI: qcom: Add a flag in match data along with ops
Quoting Prasad Malisetty (2021-10-04 12:41:27)
> @@ -1488,7 +1528,13 @@ static int qcom_pcie_probe(struct platform_device *pdev)
>
> pcie->pci = pci;
>
> - pcie->ops = of_device_get_match_data(dev);
> + pcie_cfg = of_device_get_match_data(dev);
> + pcie->ops = pcie_cfg->ops;
> + if (!pcie->ops) {

Sorry I meant check for pcie_cfg being NULL too.
of_device_get_match_data() can return NULL if the match doesn't work for
some reason.

> + dev_err(dev, "Invalid platform data\n");
> + return -EINVAL;
> + }
> + pcie->pipe_clk_need_muxing = pcie_cfg->pipe_clk_need_muxing;
>
> pcie->reset = devm_gpiod_get_optional(dev, "perst", GPIOD_OUT_HIGH);
> if (IS_ERR(pcie->reset)) {

\
 
 \ /
  Last update: 2021-10-05 03:14    [W:0.066 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site