]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
spi: mpc5xxx-psc: Consistently use device property APIs
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 6 Mar 2023 18:31:15 +0000 (20:31 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 7 Mar 2023 13:58:34 +0000 (13:58 +0000)
Instead of calling the OF APIs mixed with device property APIs,
just switch to use the latter everywhere.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230306183115.87314-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mpc52xx-psc.c

index 335a6b9eb141512f62afa3e0f76884e1816e0d8c..9a1a080fb688c2b8a4551380a8ec72fc2a2e9d4f 100644 (file)
@@ -309,7 +309,7 @@ static int mpc52xx_psc_spi_of_probe(struct platform_device *pdev)
        /* the spi->mode bits understood by this driver: */
        master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST;
 
-       ret = of_property_read_u32(dev->of_node, "cell-index", &bus_num);
+       ret = device_property_read_u32(dev, "cell-index", &bus_num);
        if (ret || bus_num > 5)
                return dev_err_probe(dev, ret ? : -EINVAL, "Invalid cell-index property\n");
        master->bus_num = bus_num + 1;