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().