diff options
author | Simon Glass | 2020-12-03 16:55:20 -0700 |
---|---|---|
committer | Simon Glass | 2020-12-13 16:51:09 -0700 |
commit | c69cda25c9b59e53a6bc8969ada58942549f5b5d (patch) | |
tree | 8c84d1773465eb8e06cbbaeb710daa6217f5618d /doc | |
parent | 4f50086ad6d69c355a07389fb436c64c92ec614a (diff) |
dm: treewide: Rename dev_get_platdata() to dev_get_plat()
Rename this to be consistent with the change from 'platdata'.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/driver-model/design.rst | 2 | ||||
-rw-r--r-- | doc/driver-model/of-plat.rst | 6 | ||||
-rw-r--r-- | doc/driver-model/spi-howto.rst | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/doc/driver-model/design.rst b/doc/driver-model/design.rst index 2cdea1c161c..d552f46417f 100644 --- a/doc/driver-model/design.rst +++ b/doc/driver-model/design.rst @@ -282,7 +282,7 @@ in drivers/demo/demo-simple.c: static int simple_hello(struct udevice *dev, int ch) { - const struct dm_demo_pdata *pdata = dev_get_platdata(dev); + const struct dm_demo_pdata *pdata = dev_get_plat(dev); printf("Hello from %08x: %s %d\n", map_to_sysmem(dev), pdata->colour, pdata->sides); diff --git a/doc/driver-model/of-plat.rst b/doc/driver-model/of-plat.rst index 8c2bfb4099c..b9976ac72d4 100644 --- a/doc/driver-model/of-plat.rst +++ b/doc/driver-model/of-plat.rst @@ -171,7 +171,7 @@ accessed using: .. code-block:: c struct udevice *dev; - struct dtd_rockchip_rk3288_dw_mshc *plat = dev_get_platdata(dev); + struct dtd_rockchip_rk3288_dw_mshc *plat = dev_get_plat(dev); This avoids the code overhead of converting the device tree data to platform data in the driver. The ofdata_to_platdata() method should @@ -258,7 +258,7 @@ For example: { #if !CONFIG_IS_ENABLED(OF_PLATDATA) /* Decode the device tree data */ - struct mmc_platdata *plat = dev_get_platdata(dev); + struct mmc_platdata *plat = dev_get_plat(dev); const void *blob = gd->fdt_blob; int node = dev_of_offset(dev); @@ -270,7 +270,7 @@ For example: static int mmc_probe(struct udevice *dev) { - struct mmc_platdata *plat = dev_get_platdata(dev); + struct mmc_platdata *plat = dev_get_plat(dev); #if CONFIG_IS_ENABLED(OF_PLATDATA) /* Decode the of-platdata from the C structures */ diff --git a/doc/driver-model/spi-howto.rst b/doc/driver-model/spi-howto.rst index 6a1aacef0f7..b3b719f572c 100644 --- a/doc/driver-model/spi-howto.rst +++ b/doc/driver-model/spi-howto.rst @@ -357,7 +357,7 @@ what you can copy out to set things up. static int exynos_spi_probe(struct udevice *bus) { - struct exynos_spi_platdata *plat = dev_get_platdata(bus); + struct exynos_spi_platdata *plat = dev_get_plat(bus); struct exynos_spi_priv *priv = dev_get_priv(bus); priv->regs = plat->regs; @@ -585,7 +585,7 @@ The new version looks like this: static void spi_cs_activate(struct udevice *dev) { struct udevice *bus = dev->parent; - struct exynos_spi_platdata *pdata = dev_get_platdata(bus); + struct exynos_spi_platdata *pdata = dev_get_plat(bus); struct exynos_spi_priv *priv = dev_get_priv(bus); /* If it's too soon to do another transaction, wait */ |