Re: [PATCH 7/7] spi: spi-zynqmp-gqspi: Add tap delay support for GQSPI controller on Versal platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/09/2022 08:47, Amit Kumar Mahapatra wrote:
> @@ -1165,6 +1214,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
>  	struct spi_controller *ctlr;
>  	struct zynqmp_qspi *xqspi;
>  	struct device *dev = &pdev->dev;
> +	const struct of_device_id *match;
>  	struct device_node *np = dev->of_node;
>  
>  	ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
> @@ -1176,6 +1226,13 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
>  	xqspi->ctlr = ctlr;
>  	platform_set_drvdata(pdev, xqspi);
>  
> +	match = of_match_node(zynqmp_qspi_of_match, pdev->dev.of_node);
> +	if (match) {
> +		const struct qspi_platform_data *p_data = match->data;

There is a helper for that. Use it.

Best regards,
Krzysztof



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux