static int orion_spi_probe(struct platform_device *pdev)
{
- const struct of_device_id *of_id;
const struct orion_spi_dev *devdata;
struct spi_master *master;
struct orion_spi *spi;
spi->master = master;
spi->dev = &pdev->dev;
- of_id = of_match_device(orion_spi_of_match_table, &pdev->dev);
- devdata = (of_id) ? of_id->data : &orion_spi_dev_data;
- spi->devdata = devdata;
+ devdata = device_get_match_data(&pdev->dev);
+ spi->devdata = devdata ? devdata : &orion_spi_dev_data;
spi->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(spi->clk)) {