Re: [PATCH v2] spi: davinci: Use of_device_get_match_data() helper

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

 



On Tue, Mar 30, 2021 at 9:30 AM Tian Tao <tiantao6@xxxxxxxxxxxxx> wrote:

> -       match = of_match_device(davinci_spi_of_match, &pdev->dev);
> -       if (!match)
> +       spi_data = of_device_get_match_data(&pdev->dev);
> +       if (!spi_data)

No need to check against NULL here because all compatible strings
provide .data and DT is the only mechanism to probe.

Also, this could be device_get_match_data().



[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