From patchwork Wed Feb 19 19:39:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Goldschmidt X-Patchwork-Id: 236598 List-Id: U-Boot discussion From: simon.k.r.goldschmidt at gmail.com (Simon Goldschmidt) Date: Wed, 19 Feb 2020 20:39:27 +0100 Subject: [PATCH 1/8] malloc: implement USE_DL_PREFIX via inline functions In-Reply-To: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> References: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> Message-ID: <20200219193934.28456-2-simon.k.r.goldschmidt@gmail.com> Commit cfda60f99ae2 ("sandbox: Use a prefix for all allocation functions") introduced preprocessor macros for malloc/free etc. This is bad practice as it essentially makes 'free' a reserved keyword and resulted in quite a bit of renaming to avoid that reserved keyword. A better solution is to define the allocation functions as 'static inline'. As a side effect, exports.h must not export malloc/free for sandbox. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- A side-effect is that exports.h may not declare malloc/free. I'm not really sure if this is correct, but for sandbox, it should probably be ok? include/_exports.h | 2 ++ include/exports.h | 2 ++ include/malloc.h | 44 +++++++++++++++++++++++++++++--------------- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/include/_exports.h b/include/_exports.h index 0dee05f077..acfbf97c17 100644 --- a/include/_exports.h +++ b/include/_exports.h @@ -22,9 +22,11 @@ EXPORT_FUNC(dummy, void, install_hdlr, void) EXPORT_FUNC(dummy, void, free_hdlr, void) #endif +#ifndef CONFIG_SANDBOX EXPORT_FUNC(malloc, void *, malloc, size_t) #if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) EXPORT_FUNC(free, void, free, void *) +#endif #endif EXPORT_FUNC(udelay, void, udelay, unsigned long) EXPORT_FUNC(get_timer, unsigned long, get_timer, unsigned long) diff --git a/include/exports.h b/include/exports.h index cbd16fc518..5d161824c8 100644 --- a/include/exports.h +++ b/include/exports.h @@ -25,10 +25,12 @@ void puts(const char*); int printf(const char* fmt, ...); void install_hdlr(int, interrupt_handler_t, void*); void free_hdlr(int); +#ifndef CONFIG_SANDBOX void *malloc(size_t); #if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) void free(void*); #endif +#endif void __udelay(unsigned long); unsigned long get_timer(unsigned long); int vprintf(const char *, va_list); diff --git a/include/malloc.h b/include/malloc.h index f66c2e8617..50d4873b08 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -897,21 +897,6 @@ void malloc_simple_info(void); # define pvALLOc dlpvalloc # define mALLINFo dlmallinfo # define mALLOPt dlmallopt - -/* Ensure that U-Boot actually uses these too */ -#define calloc dlcalloc -#define free(ptr) dlfree(ptr) -#define malloc(x) dlmalloc(x) -#define memalign dlmemalign -#define realloc dlrealloc -#define valloc dlvalloc -#define pvalloc dlpvalloc -#define mallinfo() dlmallinfo() -#define mallopt dlmallopt -#define malloc_trim dlmalloc_trim -#define malloc_usable_size dlmalloc_usable_size -#define malloc_stats dlmalloc_stats - # else /* USE_DL_PREFIX */ # define cALLOc calloc # define fREe free @@ -966,6 +951,35 @@ void malloc_stats(); int mALLOPt(); struct mallinfo mALLINFo(); # endif + +# ifdef USE_DL_PREFIX +/* Ensure that U-Boot actually uses the redefined functions: */ +static inline void *calloc(size_t n, size_t elem_size) +{ + return dlcalloc(n, elem_size); +} + +static inline void free(void *ptr) { dlfree(ptr); } +static inline void *malloc(size_t bytes) { return dlmalloc(bytes); } +static inline void *memalign(size_t alignment, size_t bytes) +{ + return dlmemalign(alignment, bytes); +} + +static inline void *realloc(void *oldmem, size_t bytes) +{ + return dlrealloc(oldmem, bytes); +} + +static inline void *valloc(size_t bytes) { return dlvalloc(bytes); } +static inline void *pvalloc(size_t bytes) { return dlpvalloc(bytes); } +static inline struct mallinfo mallinfo(void) { return dlmallinfo(); } +static inline int mallopt(int param_number, int value) +{ + return dlmallopt(param_number, value); +} +# endif + #endif #pragma GCC visibility pop From patchwork Wed Feb 19 19:39:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Goldschmidt X-Patchwork-Id: 236599 List-Id: U-Boot discussion From: simon.k.r.goldschmidt at gmail.com (Simon Goldschmidt) Date: Wed, 19 Feb 2020 20:39:28 +0100 Subject: [PATCH 2/8] Revert "mtd: Rename free() to rfree()" In-Reply-To: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> References: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> Message-ID: <20200219193934.28456-3-simon.k.r.goldschmidt@gmail.com> This reverts commit 8d38a8459b0de45f5ff41f3e11c278a5cf395fd0. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- drivers/mtd/mtdcore.c | 4 ++-- drivers/mtd/nand/raw/denali.c | 2 +- drivers/mtd/nand/spi/core.c | 2 +- drivers/mtd/nand/spi/gigadevice.c | 2 +- drivers/mtd/nand/spi/macronix.c | 2 +- drivers/mtd/nand/spi/micron.c | 2 +- drivers/mtd/nand/spi/winbond.c | 2 +- include/linux/mtd/mtd.h | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index f8d3f4d246..4567e5eb7a 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -1180,10 +1180,10 @@ int mtd_ooblayout_free(struct mtd_info *mtd, int section, if (!mtd || section < 0) return -EINVAL; - if (!mtd->ooblayout || !mtd->ooblayout->rfree) + if (!mtd->ooblayout || !mtd->ooblayout->free) return -ENOTSUPP; - return mtd->ooblayout->rfree(mtd, section, oobfree); + return mtd->ooblayout->free(mtd, section, oobfree); } EXPORT_SYMBOL_GPL(mtd_ooblayout_free); diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c index f51d3e25c7..550fb7c771 100644 --- a/drivers/mtd/nand/raw/denali.c +++ b/drivers/mtd/nand/raw/denali.c @@ -1160,7 +1160,7 @@ static int denali_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops denali_ooblayout_ops = { .ecc = denali_ooblayout_ecc, - .rfree = denali_ooblayout_free, + .free = denali_ooblayout_free, }; static int denali_multidev_fixup(struct denali_nand_info *denali) diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index cd624ec6ae..5e3704e4d0 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -1023,7 +1023,7 @@ static int spinand_noecc_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops spinand_noecc_ooblayout = { .ecc = spinand_noecc_ooblayout_ecc, - .rfree = spinand_noecc_ooblayout_free, + .free = spinand_noecc_ooblayout_free, }; static int spinand_init(struct spinand_device *spinand) diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c index 0b228dcb5b..4c8bb1e12d 100644 --- a/drivers/mtd/nand/spi/gigadevice.c +++ b/drivers/mtd/nand/spi/gigadevice.c @@ -104,7 +104,7 @@ static int gd5fxgq4xexxg_ecc_get_status(struct spinand_device *spinand, static const struct mtd_ooblayout_ops gd5fxgq4xexxg_ooblayout = { .ecc = gd5fxgq4xexxg_ooblayout_ecc, - .rfree = gd5fxgq4xexxg_ooblayout_free, + .free = gd5fxgq4xexxg_ooblayout_free, }; static const struct spinand_info gigadevice_spinand_table[] = { diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/macronix.c index 67d092be2c..2948e2ea41 100644 --- a/drivers/mtd/nand/spi/macronix.c +++ b/drivers/mtd/nand/spi/macronix.c @@ -48,7 +48,7 @@ static int mx35lfxge4ab_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops mx35lfxge4ab_ooblayout = { .ecc = mx35lfxge4ab_ooblayout_ecc, - .rfree = mx35lfxge4ab_ooblayout_free, + .free = mx35lfxge4ab_ooblayout_free, }; static int mx35lf1ge4ab_get_eccsr(struct spinand_device *spinand, u8 *eccsr) diff --git a/drivers/mtd/nand/spi/micron.c b/drivers/mtd/nand/spi/micron.c index 687306e33e..718c4b42ca 100644 --- a/drivers/mtd/nand/spi/micron.c +++ b/drivers/mtd/nand/spi/micron.c @@ -64,7 +64,7 @@ static int mt29f2g01abagd_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops mt29f2g01abagd_ooblayout = { .ecc = mt29f2g01abagd_ooblayout_ecc, - .rfree = mt29f2g01abagd_ooblayout_free, + .free = mt29f2g01abagd_ooblayout_free, }; static int mt29f2g01abagd_ecc_get_status(struct spinand_device *spinand, diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c index 6ede98c85d..b05cd70457 100644 --- a/drivers/mtd/nand/spi/winbond.c +++ b/drivers/mtd/nand/spi/winbond.c @@ -60,7 +60,7 @@ static int w25m02gv_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops w25m02gv_ooblayout = { .ecc = w25m02gv_ooblayout_ecc, - .rfree = w25m02gv_ooblayout_free, + .free = w25m02gv_ooblayout_free, }; static int w25m02gv_select_target(struct spinand_device *spinand, diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 1b9151714c..ceffd994de 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -129,8 +129,8 @@ struct mtd_oob_region { struct mtd_ooblayout_ops { int (*ecc)(struct mtd_info *mtd, int section, struct mtd_oob_region *oobecc); - int (*rfree)(struct mtd_info *mtd, int section, - struct mtd_oob_region *oobfree); + int (*free)(struct mtd_info *mtd, int section, + struct mtd_oob_region *oobfree); }; /* From patchwork Wed Feb 19 19:39:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Goldschmidt X-Patchwork-Id: 236600 List-Id: U-Boot discussion From: simon.k.r.goldschmidt at gmail.com (Simon Goldschmidt) Date: Wed, 19 Feb 2020 20:39:29 +0100 Subject: [PATCH 3/8] Revert "dma: Rename free() to rfree()" In-Reply-To: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> References: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> Message-ID: <20200219193934.28456-4-simon.k.r.goldschmidt@gmail.com> This reverts commit aae95882232a24ee49c89d0356febf3685a87c8a. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- drivers/dma/dma-uclass.c | 4 ++-- drivers/dma/sandbox-dma-test.c | 4 ++-- drivers/dma/ti/k3-udma.c | 4 ++-- include/dma-uclass.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c index 9d5a7fc796..68e17ed1f9 100644 --- a/drivers/dma/dma-uclass.c +++ b/drivers/dma/dma-uclass.c @@ -123,10 +123,10 @@ int dma_free(struct dma *dma) debug("%s(dma=%p)\n", __func__, dma); - if (!ops->rfree) + if (!ops->free) return 0; - return ops->rfree(dma); + return ops->free(dma); } int dma_enable(struct dma *dma) diff --git a/drivers/dma/sandbox-dma-test.c b/drivers/dma/sandbox-dma-test.c index 234a7d2134..e8c809fa64 100644 --- a/drivers/dma/sandbox-dma-test.c +++ b/drivers/dma/sandbox-dma-test.c @@ -89,7 +89,7 @@ static int sandbox_dma_request(struct dma *dma) return 0; } -static int sandbox_dma_rfree(struct dma *dma) +static int sandbox_dma_free(struct dma *dma) { struct sandbox_dma_dev *ud = dev_get_priv(dma->dev); struct sandbox_dma_chan *uc; @@ -230,7 +230,7 @@ static const struct dma_ops sandbox_dma_ops = { .transfer = sandbox_dma_transfer, .of_xlate = sandbox_dma_of_xlate, .request = sandbox_dma_request, - .rfree = sandbox_dma_rfree, + .free = sandbox_dma_free, .enable = sandbox_dma_enable, .disable = sandbox_dma_disable, .send = sandbox_dma_send, diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index f274100f32..d6eb6d9339 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -1553,7 +1553,7 @@ static int udma_request(struct dma *dma) return 0; } -static int udma_rfree(struct dma *dma) +static int udma_free(struct dma *dma) { struct udma_dev *ud = dev_get_priv(dma->dev); struct udma_chan *uc; @@ -1848,7 +1848,7 @@ static const struct dma_ops udma_ops = { .transfer = udma_transfer, .of_xlate = udma_of_xlate, .request = udma_request, - .rfree = udma_rfree, + .free = udma_free, .enable = udma_enable, .disable = udma_disable, .send = udma_send, diff --git a/include/dma-uclass.h b/include/dma-uclass.h index 340437acc1..a1d9d26ac5 100644 --- a/include/dma-uclass.h +++ b/include/dma-uclass.h @@ -58,14 +58,14 @@ struct dma_ops { */ int (*request)(struct dma *dma); /** - * rfree - Free a previously requested dma. + * free - Free a previously requested dma. * * This is the implementation of the client dma_free() API. * * @dma: The DMA to free. * @return 0 if OK, or a negative error code. */ - int (*rfree)(struct dma *dma); + int (*free)(struct dma *dma); /** * enable() - Enable a DMA Channel. * From patchwork Wed Feb 19 19:39:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Goldschmidt X-Patchwork-Id: 236601 List-Id: U-Boot discussion From: simon.k.r.goldschmidt at gmail.com (Simon Goldschmidt) Date: Wed, 19 Feb 2020 20:39:30 +0100 Subject: [PATCH 4/8] Revert "clk: Rename free() to rfree()" In-Reply-To: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> References: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> Message-ID: <20200219193934.28456-5-simon.k.r.goldschmidt@gmail.com> This reverts commit fb8c0d595f1ad83bee5dd398b59b0ee16d8d15a9. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- drivers/clk/clk-ti-sci.c | 2 +- drivers/clk/clk-uclass.c | 4 ++-- drivers/clk/clk_sandbox.c | 2 +- drivers/clk/tegra/tegra-car-clk.c | 2 +- include/clk-uclass.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/clk/clk-ti-sci.c b/drivers/clk/clk-ti-sci.c index 82241d9f3f..e272003d30 100644 --- a/drivers/clk/clk-ti-sci.c +++ b/drivers/clk/clk-ti-sci.c @@ -206,7 +206,7 @@ static const struct udevice_id ti_sci_clk_of_match[] = { static struct clk_ops ti_sci_clk_ops = { .of_xlate = ti_sci_clk_of_xlate, .request = ti_sci_clk_request, - .rfree = ti_sci_clk_free, + .free = ti_sci_clk_free, .get_rate = ti_sci_clk_get_rate, .set_rate = ti_sci_clk_set_rate, .set_parent = ti_sci_clk_set_parent, diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index 71878474eb..24353fae53 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers/clk/clk-uclass.c @@ -426,10 +426,10 @@ int clk_free(struct clk *clk) return 0; ops = clk_dev_ops(clk->dev); - if (!ops->rfree) + if (!ops->free) return 0; - return ops->rfree(clk); + return ops->free(clk); } ulong clk_get_rate(struct clk *clk) diff --git a/drivers/clk/clk_sandbox.c b/drivers/clk/clk_sandbox.c index 768fbb7c52..7059979606 100644 --- a/drivers/clk/clk_sandbox.c +++ b/drivers/clk/clk_sandbox.c @@ -108,7 +108,7 @@ static struct clk_ops sandbox_clk_ops = { .enable = sandbox_clk_enable, .disable = sandbox_clk_disable, .request = sandbox_clk_request, - .rfree = sandbox_clk_free, + .free = sandbox_clk_free, }; static int sandbox_clk_probe(struct udevice *dev) diff --git a/drivers/clk/tegra/tegra-car-clk.c b/drivers/clk/tegra/tegra-car-clk.c index 6083f14e75..1f0e2dc95b 100644 --- a/drivers/clk/tegra/tegra-car-clk.c +++ b/drivers/clk/tegra/tegra-car-clk.c @@ -81,7 +81,7 @@ static int tegra_car_clk_disable(struct clk *clk) static struct clk_ops tegra_car_clk_ops = { .request = tegra_car_clk_request, - .rfree = tegra_car_clk_free, + .free = tegra_car_clk_free, .get_rate = tegra_car_clk_get_rate, .set_rate = tegra_car_clk_set_rate, .enable = tegra_car_clk_enable, diff --git a/include/clk-uclass.h b/include/clk-uclass.h index dac42dab36..e76d98e2f6 100644 --- a/include/clk-uclass.h +++ b/include/clk-uclass.h @@ -53,14 +53,14 @@ struct clk_ops { */ int (*request)(struct clk *clock); /** - * rfree - Free a previously requested clock. + * free - Free a previously requested clock. * * This is the implementation of the client clk_free() API. * * @clock: The clock to free. * @return 0 if OK, or a negative error code. */ - int (*rfree)(struct clk *clock); + int (*free)(struct clk *clock); /** * get_rate() - Get current clock rate. * From patchwork Wed Feb 19 19:39:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Goldschmidt X-Patchwork-Id: 236602 List-Id: U-Boot discussion From: simon.k.r.goldschmidt at gmail.com (Simon Goldschmidt) Date: Wed, 19 Feb 2020 20:39:31 +0100 Subject: [PATCH 5/8] Revert "gpio: Rename free() to rfree()" In-Reply-To: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> References: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> Message-ID: <20200219193934.28456-6-simon.k.r.goldschmidt@gmail.com> This reverts commit 093152f275e036e54d48b3d9fc0adbc1ca4cc5b0. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- drivers/gpio/gpio-rcar.c | 2 +- drivers/gpio/gpio-uclass.c | 8 ++++---- include/asm-generic/gpio.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index 9dc4cd6042..25bbbcde4b 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c @@ -130,7 +130,7 @@ static int rcar_gpio_free(struct udevice *dev, unsigned offset) static const struct dm_gpio_ops rcar_gpio_ops = { .request = rcar_gpio_request, - .rfree = rcar_gpio_free, + .free = rcar_gpio_free, .direction_input = rcar_gpio_direction_input, .direction_output = rcar_gpio_direction_output, .get_value = rcar_gpio_get_value, diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c index 0a22441d38..90fbed455b 100644 --- a/drivers/gpio/gpio-uclass.c +++ b/drivers/gpio/gpio-uclass.c @@ -364,8 +364,8 @@ int _dm_gpio_free(struct udevice *dev, uint offset) uc_priv = dev_get_uclass_priv(dev); if (!uc_priv->name[offset]) return -ENXIO; - if (gpio_get_ops(dev)->rfree) { - ret = gpio_get_ops(dev)->rfree(dev, offset); + if (gpio_get_ops(dev)->free) { + ret = gpio_get_ops(dev)->free(dev, offset); if (ret) return ret; } @@ -1043,8 +1043,8 @@ static int gpio_post_bind(struct udevice *dev) if (!reloc_done) { if (ops->request) ops->request += gd->reloc_off; - if (ops->rfree) - ops->rfree += gd->reloc_off; + if (ops->free) + ops->free += gd->reloc_off; if (ops->direction_input) ops->direction_input += gd->reloc_off; if (ops->direction_output) diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 05777e6afe..d6cf18744f 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -248,7 +248,7 @@ int gpio_xlate_offs_flags(struct udevice *dev, struct gpio_desc *desc, */ struct dm_gpio_ops { int (*request)(struct udevice *dev, unsigned offset, const char *label); - int (*rfree)(struct udevice *dev, unsigned int offset); + int (*free)(struct udevice *dev, unsigned offset); int (*direction_input)(struct udevice *dev, unsigned offset); int (*direction_output)(struct udevice *dev, unsigned offset, int value); From patchwork Wed Feb 19 19:39:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Goldschmidt X-Patchwork-Id: 236605 List-Id: U-Boot discussion From: simon.k.r.goldschmidt at gmail.com (Simon Goldschmidt) Date: Wed, 19 Feb 2020 20:39:32 +0100 Subject: [PATCH 6/8] Revert "reset: Rename free() to rfree()" In-Reply-To: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> References: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> Message-ID: <20200219193934.28456-7-simon.k.r.goldschmidt@gmail.com> This reverts commit 94474b25c3a60a746bf641a975c3db239dae29b9. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- drivers/reset/reset-bcm6345.c | 2 +- drivers/reset/reset-hisilicon.c | 2 +- drivers/reset/reset-hsdk.c | 2 +- drivers/reset/reset-imx7.c | 2 +- drivers/reset/reset-mediatek.c | 2 +- drivers/reset/reset-meson.c | 2 +- drivers/reset/reset-mtmips.c | 2 +- drivers/reset/reset-rockchip.c | 2 +- drivers/reset/reset-socfpga.c | 2 +- drivers/reset/reset-sunxi.c | 2 +- drivers/reset/reset-ti-sci.c | 2 +- drivers/reset/reset-uclass.c | 2 +- drivers/reset/reset-uniphier.c | 2 +- drivers/reset/sandbox-reset.c | 2 +- drivers/reset/sti-reset.c | 2 +- drivers/reset/stm32-reset.c | 2 +- drivers/reset/tegra-car-reset.c | 2 +- drivers/reset/tegra186-reset.c | 2 +- include/reset-uclass.h | 4 ++-- 19 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c index c1f1e7f70b..f26582479e 100644 --- a/drivers/reset/reset-bcm6345.c +++ b/drivers/reset/reset-bcm6345.c @@ -53,7 +53,7 @@ static int bcm6345_reset_request(struct reset_ctl *rst) } struct reset_ops bcm6345_reset_reset_ops = { - .rfree = bcm6345_reset_free, + .free = bcm6345_reset_free, .request = bcm6345_reset_request, .rst_assert = bcm6345_reset_assert, .rst_deassert = bcm6345_reset_deassert, diff --git a/drivers/reset/reset-hisilicon.c b/drivers/reset/reset-hisilicon.c index a678b8f745..54a254f9cb 100644 --- a/drivers/reset/reset-hisilicon.c +++ b/drivers/reset/reset-hisilicon.c @@ -73,7 +73,7 @@ static int hisi_reset_of_xlate(struct reset_ctl *rst, static const struct reset_ops hisi_reset_reset_ops = { .of_xlate = hisi_reset_of_xlate, .request = hisi_reset_request, - .rfree = hisi_reset_free, + .free = hisi_reset_free, .rst_assert = hisi_reset_assert, .rst_deassert = hisi_reset_deassert, }; diff --git a/drivers/reset/reset-hsdk.c b/drivers/reset/reset-hsdk.c index f9a432a7a2..213d6c87be 100644 --- a/drivers/reset/reset-hsdk.c +++ b/drivers/reset/reset-hsdk.c @@ -81,7 +81,7 @@ static int hsdk_reset_noop(struct reset_ctl *rst_ctl) static const struct reset_ops hsdk_reset_ops = { .request = hsdk_reset_noop, - .rfree = hsdk_reset_noop, + .free = hsdk_reset_noop, .rst_assert = hsdk_reset_noop, .rst_deassert = hsdk_reset_reset, }; diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c index a61855e9ed..59d7088c9f 100644 --- a/drivers/reset/reset-imx7.c +++ b/drivers/reset/reset-imx7.c @@ -273,7 +273,7 @@ static int imx7_reset_request(struct reset_ctl *rst) static const struct reset_ops imx7_reset_reset_ops = { .request = imx7_reset_request, - .rfree = imx7_reset_free, + .free = imx7_reset_free, .rst_assert = imx7_reset_assert, .rst_deassert = imx7_reset_deassert, }; diff --git a/drivers/reset/reset-mediatek.c b/drivers/reset/reset-mediatek.c index 6d17f52ac7..0680abbe28 100644 --- a/drivers/reset/reset-mediatek.c +++ b/drivers/reset/reset-mediatek.c @@ -57,7 +57,7 @@ static int mediatek_reset_deassert(struct reset_ctl *reset_ctl) struct reset_ops mediatek_reset_ops = { .request = mediatek_reset_request, - .rfree = mediatek_reset_free, + .free = mediatek_reset_free, .rst_assert = mediatek_reset_assert, .rst_deassert = mediatek_reset_deassert, }; diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c index 70f96355b3..180780061e 100644 --- a/drivers/reset/reset-meson.c +++ b/drivers/reset/reset-meson.c @@ -63,7 +63,7 @@ static int meson_reset_deassert(struct reset_ctl *reset_ctl) struct reset_ops meson_reset_ops = { .request = meson_reset_request, - .rfree = meson_reset_free, + .free = meson_reset_free, .rst_assert = meson_reset_assert, .rst_deassert = meson_reset_deassert, }; diff --git a/drivers/reset/reset-mtmips.c b/drivers/reset/reset-mtmips.c index 677de0a6f9..5df95f1324 100644 --- a/drivers/reset/reset-mtmips.c +++ b/drivers/reset/reset-mtmips.c @@ -46,7 +46,7 @@ static int mtmips_reset_deassert(struct reset_ctl *reset_ctl) static const struct reset_ops mtmips_reset_ops = { .request = mtmips_reset_request, - .rfree = mtmips_reset_free, + .free = mtmips_reset_free, .rst_assert = mtmips_reset_assert, .rst_deassert = mtmips_reset_deassert, }; diff --git a/drivers/reset/reset-rockchip.c b/drivers/reset/reset-rockchip.c index 100afc8103..a4dc103951 100644 --- a/drivers/reset/reset-rockchip.c +++ b/drivers/reset/reset-rockchip.c @@ -77,7 +77,7 @@ static int rockchip_reset_deassert(struct reset_ctl *reset_ctl) struct reset_ops rockchip_reset_ops = { .request = rockchip_reset_request, - .rfree = rockchip_reset_free, + .free = rockchip_reset_free, .rst_assert = rockchip_reset_assert, .rst_deassert = rockchip_reset_deassert, }; diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index c0930a624b..cab1230b9d 100644 --- a/drivers/reset/reset-socfpga.c +++ b/drivers/reset/reset-socfpga.c @@ -106,7 +106,7 @@ static int socfpga_reset_free(struct reset_ctl *reset_ctl) static const struct reset_ops socfpga_reset_ops = { .request = socfpga_reset_request, - .rfree = socfpga_reset_free, + .free = socfpga_reset_free, .rst_assert = socfpga_reset_assert, .rst_deassert = socfpga_reset_deassert, }; diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c index f21bf3b1ae..b3b6782717 100644 --- a/drivers/reset/reset-sunxi.c +++ b/drivers/reset/reset-sunxi.c @@ -82,7 +82,7 @@ static int sunxi_reset_deassert(struct reset_ctl *reset_ctl) struct reset_ops sunxi_reset_ops = { .request = sunxi_reset_request, - .rfree = sunxi_reset_free, + .free = sunxi_reset_free, .rst_assert = sunxi_reset_assert, .rst_deassert = sunxi_reset_deassert, }; diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c index f5d82b5681..8ee7211aa3 100644 --- a/drivers/reset/reset-ti-sci.c +++ b/drivers/reset/reset-ti-sci.c @@ -193,7 +193,7 @@ static const struct udevice_id ti_sci_reset_of_match[] = { static struct reset_ops ti_sci_reset_ops = { .of_xlate = ti_sci_reset_of_xlate, .request = ti_sci_reset_request, - .rfree = ti_sci_reset_free, + .free = ti_sci_reset_free, .rst_assert = ti_sci_reset_assert, .rst_deassert = ti_sci_reset_deassert, .rst_status = ti_sci_reset_status, diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c index 8ec8e462e6..7103ccb43f 100644 --- a/drivers/reset/reset-uclass.c +++ b/drivers/reset/reset-uclass.c @@ -166,7 +166,7 @@ int reset_free(struct reset_ctl *reset_ctl) debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); - return ops->rfree(reset_ctl); + return ops->free(reset_ctl); } int reset_assert(struct reset_ctl *reset_ctl) diff --git a/drivers/reset/reset-uniphier.c b/drivers/reset/reset-uniphier.c index 348f3886d1..da0138c48c 100644 --- a/drivers/reset/reset-uniphier.c +++ b/drivers/reset/reset-uniphier.c @@ -236,7 +236,7 @@ static int uniphier_reset_deassert(struct reset_ctl *reset_ctl) static const struct reset_ops uniphier_reset_ops = { .request = uniphier_reset_request, - .rfree = uniphier_reset_free, + .free = uniphier_reset_free, .rst_assert = uniphier_reset_assert, .rst_deassert = uniphier_reset_deassert, }; diff --git a/drivers/reset/sandbox-reset.c b/drivers/reset/sandbox-reset.c index bdf53a3de9..ce6f6e434a 100644 --- a/drivers/reset/sandbox-reset.c +++ b/drivers/reset/sandbox-reset.c @@ -80,7 +80,7 @@ static const struct udevice_id sandbox_reset_ids[] = { struct reset_ops sandbox_reset_reset_ops = { .request = sandbox_reset_request, - .rfree = sandbox_reset_free, + .free = sandbox_reset_free, .rst_assert = sandbox_reset_assert, .rst_deassert = sandbox_reset_deassert, }; diff --git a/drivers/reset/sti-reset.c b/drivers/reset/sti-reset.c index 31b3e48e0e..b82eb019d1 100644 --- a/drivers/reset/sti-reset.c +++ b/drivers/reset/sti-reset.c @@ -299,7 +299,7 @@ static int sti_reset_deassert(struct reset_ctl *reset_ctl) struct reset_ops sti_reset_ops = { .request = sti_reset_request, - .rfree = sti_reset_free, + .free = sti_reset_free, .rst_assert = sti_reset_assert, .rst_deassert = sti_reset_deassert, }; diff --git a/drivers/reset/stm32-reset.c b/drivers/reset/stm32-reset.c index 5dda522a4e..ed7a7cc4c8 100644 --- a/drivers/reset/stm32-reset.c +++ b/drivers/reset/stm32-reset.c @@ -65,7 +65,7 @@ static int stm32_reset_deassert(struct reset_ctl *reset_ctl) static const struct reset_ops stm32_reset_ops = { .request = stm32_reset_request, - .rfree = stm32_reset_free, + .free = stm32_reset_free, .rst_assert = stm32_reset_assert, .rst_deassert = stm32_reset_deassert, }; diff --git a/drivers/reset/tegra-car-reset.c b/drivers/reset/tegra-car-reset.c index 23c6facff2..a0a1fb62d9 100644 --- a/drivers/reset/tegra-car-reset.c +++ b/drivers/reset/tegra-car-reset.c @@ -52,7 +52,7 @@ static int tegra_car_reset_deassert(struct reset_ctl *reset_ctl) struct reset_ops tegra_car_reset_ops = { .request = tegra_car_reset_request, - .rfree = tegra_car_reset_free, + .free = tegra_car_reset_free, .rst_assert = tegra_car_reset_assert, .rst_deassert = tegra_car_reset_deassert, }; diff --git a/drivers/reset/tegra186-reset.c b/drivers/reset/tegra186-reset.c index e85f42b3a3..759594c71f 100644 --- a/drivers/reset/tegra186-reset.c +++ b/drivers/reset/tegra186-reset.c @@ -61,7 +61,7 @@ static int tegra186_reset_deassert(struct reset_ctl *reset_ctl) struct reset_ops tegra186_reset_ops = { .request = tegra186_reset_request, - .rfree = tegra186_reset_free, + .free = tegra186_reset_free, .rst_assert = tegra186_reset_assert, .rst_deassert = tegra186_reset_deassert, }; diff --git a/include/reset-uclass.h b/include/reset-uclass.h index 9a0696dd1e..7b5cc3cb3b 100644 --- a/include/reset-uclass.h +++ b/include/reset-uclass.h @@ -51,14 +51,14 @@ struct reset_ops { */ int (*request)(struct reset_ctl *reset_ctl); /** - * rfree - Free a previously requested reset control. + * free - Free a previously requested reset control. * * This is the implementation of the client reset_free() API. * * @reset_ctl: The reset control to free. * @return 0 if OK, or a negative error code. */ - int (*rfree)(struct reset_ctl *reset_ctl); + int (*free)(struct reset_ctl *reset_ctl); /** * rst_assert - Assert a reset signal. * From patchwork Wed Feb 19 19:39:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Goldschmidt X-Patchwork-Id: 236603 List-Id: U-Boot discussion From: simon.k.r.goldschmidt at gmail.com (Simon Goldschmidt) Date: Wed, 19 Feb 2020 20:39:33 +0100 Subject: [PATCH 7/8] Revert "power-domain: Rename free() to rfree()" In-Reply-To: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> References: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> Message-ID: <20200219193934.28456-8-simon.k.r.goldschmidt@gmail.com> This reverts commit 4f51188e47921b17e6b3ce9606c8e71234c9f2df. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- drivers/power/domain/bcm6328-power-domain.c | 2 +- drivers/power/domain/imx8-power-domain-legacy.c | 2 +- drivers/power/domain/imx8-power-domain.c | 2 +- drivers/power/domain/imx8m-power-domain.c | 2 +- drivers/power/domain/meson-ee-pwrc.c | 2 +- drivers/power/domain/meson-gx-pwrc-vpu.c | 2 +- drivers/power/domain/mtk-power-domain.c | 2 +- drivers/power/domain/power-domain-uclass.c | 2 +- drivers/power/domain/sandbox-power-domain.c | 2 +- drivers/power/domain/tegra186-power-domain.c | 2 +- drivers/power/domain/ti-sci-power-domain.c | 2 +- include/power-domain-uclass.h | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/power/domain/bcm6328-power-domain.c b/drivers/power/domain/bcm6328-power-domain.c index a6426bee27..e261d22b50 100644 --- a/drivers/power/domain/bcm6328-power-domain.c +++ b/drivers/power/domain/bcm6328-power-domain.c @@ -63,7 +63,7 @@ static const struct udevice_id bcm6328_power_domain_ids[] = { }; struct power_domain_ops bcm6328_power_domain_ops = { - .rfree = bcm6328_power_domain_free, + .free = bcm6328_power_domain_free, .off = bcm6328_power_domain_off, .on = bcm6328_power_domain_on, .request = bcm6328_power_domain_request, diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c index 6f01a60b34..f489083f2d 100644 --- a/drivers/power/domain/imx8-power-domain-legacy.c +++ b/drivers/power/domain/imx8-power-domain-legacy.c @@ -297,7 +297,7 @@ static const struct udevice_id imx8_power_domain_ids[] = { struct power_domain_ops imx8_power_domain_ops = { .request = imx8_power_domain_request, - .rfree = imx8_power_domain_free, + .free = imx8_power_domain_free, .on = imx8_power_domain_on, .off = imx8_power_domain_off, .of_xlate = imx8_power_domain_of_xlate, diff --git a/drivers/power/domain/imx8-power-domain.c b/drivers/power/domain/imx8-power-domain.c index 571146e19d..eaf8635899 100644 --- a/drivers/power/domain/imx8-power-domain.c +++ b/drivers/power/domain/imx8-power-domain.c @@ -74,7 +74,7 @@ static const struct udevice_id imx8_power_domain_ids[] = { struct power_domain_ops imx8_power_domain_ops_v2 = { .request = imx8_power_domain_request, - .rfree = imx8_power_domain_free, + .free = imx8_power_domain_free, .on = imx8_power_domain_on, .off = imx8_power_domain_off, }; diff --git a/drivers/power/domain/imx8m-power-domain.c b/drivers/power/domain/imx8m-power-domain.c index 5b6467cda7..48a3fca6bd 100644 --- a/drivers/power/domain/imx8m-power-domain.c +++ b/drivers/power/domain/imx8m-power-domain.c @@ -122,7 +122,7 @@ static const struct udevice_id imx8m_power_domain_ids[] = { struct power_domain_ops imx8m_power_domain_ops = { .request = imx8m_power_domain_request, - .rfree = imx8m_power_domain_free, + .free = imx8m_power_domain_free, .on = imx8m_power_domain_on, .off = imx8m_power_domain_off, .of_xlate = imx8m_power_domain_of_xlate, diff --git a/drivers/power/domain/meson-ee-pwrc.c b/drivers/power/domain/meson-ee-pwrc.c index 7082c80bfa..f09bc03811 100644 --- a/drivers/power/domain/meson-ee-pwrc.c +++ b/drivers/power/domain/meson-ee-pwrc.c @@ -354,7 +354,7 @@ static int meson_ee_pwrc_of_xlate(struct power_domain *power_domain, } struct power_domain_ops meson_ee_pwrc_ops = { - .rfree = meson_ee_pwrc_free, + .free = meson_ee_pwrc_free, .off = meson_ee_pwrc_off, .on = meson_ee_pwrc_on, .request = meson_ee_pwrc_request, diff --git a/drivers/power/domain/meson-gx-pwrc-vpu.c b/drivers/power/domain/meson-gx-pwrc-vpu.c index 12cdfcdd1f..8381cb226d 100644 --- a/drivers/power/domain/meson-gx-pwrc-vpu.c +++ b/drivers/power/domain/meson-gx-pwrc-vpu.c @@ -271,7 +271,7 @@ static int meson_pwrc_vpu_of_xlate(struct power_domain *power_domain, } struct power_domain_ops meson_gx_pwrc_vpu_ops = { - .rfree = meson_pwrc_vpu_free, + .free = meson_pwrc_vpu_free, .off = meson_pwrc_vpu_off, .on = meson_pwrc_vpu_on, .request = meson_pwrc_vpu_request, diff --git a/drivers/power/domain/mtk-power-domain.c b/drivers/power/domain/mtk-power-domain.c index 3ff7ca1bef..dcf33678d7 100644 --- a/drivers/power/domain/mtk-power-domain.c +++ b/drivers/power/domain/mtk-power-domain.c @@ -398,7 +398,7 @@ static const struct udevice_id mtk_power_domain_ids[] = { }; struct power_domain_ops mtk_power_domain_ops = { - .rfree = scpsys_power_free, + .free = scpsys_power_free, .off = scpsys_power_off, .on = scpsys_power_on, .request = scpsys_power_request, diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c index d9c623b56e..fc75df1745 100644 --- a/drivers/power/domain/power-domain-uclass.c +++ b/drivers/power/domain/power-domain-uclass.c @@ -88,7 +88,7 @@ int power_domain_free(struct power_domain *power_domain) debug("%s(power_domain=%p)\n", __func__, power_domain); - return ops->rfree(power_domain); + return ops->free(power_domain); } int power_domain_on(struct power_domain *power_domain) diff --git a/drivers/power/domain/sandbox-power-domain.c b/drivers/power/domain/sandbox-power-domain.c index 3a834a9f1e..b555b11be9 100644 --- a/drivers/power/domain/sandbox-power-domain.c +++ b/drivers/power/domain/sandbox-power-domain.c @@ -76,7 +76,7 @@ static const struct udevice_id sandbox_power_domain_ids[] = { struct power_domain_ops sandbox_power_domain_ops = { .request = sandbox_power_domain_request, - .rfree = sandbox_power_domain_free, + .free = sandbox_power_domain_free, .on = sandbox_power_domain_on, .off = sandbox_power_domain_off, }; diff --git a/drivers/power/domain/tegra186-power-domain.c b/drivers/power/domain/tegra186-power-domain.c index e87244197f..a0e6bfa6ae 100644 --- a/drivers/power/domain/tegra186-power-domain.c +++ b/drivers/power/domain/tegra186-power-domain.c @@ -72,7 +72,7 @@ static int tegra186_power_domain_off(struct power_domain *power_domain) struct power_domain_ops tegra186_power_domain_ops = { .request = tegra186_power_domain_request, - .rfree = tegra186_power_domain_free, + .free = tegra186_power_domain_free, .on = tegra186_power_domain_on, .off = tegra186_power_domain_off, }; diff --git a/drivers/power/domain/ti-sci-power-domain.c b/drivers/power/domain/ti-sci-power-domain.c index a5866703ae..7b6e8a3aef 100644 --- a/drivers/power/domain/ti-sci-power-domain.c +++ b/drivers/power/domain/ti-sci-power-domain.c @@ -123,7 +123,7 @@ static const struct udevice_id ti_sci_power_domain_of_match[] = { static struct power_domain_ops ti_sci_power_domain_ops = { .request = ti_sci_power_domain_request, - .rfree = ti_sci_power_domain_free, + .free = ti_sci_power_domain_free, .on = ti_sci_power_domain_on, .off = ti_sci_power_domain_off, .of_xlate = ti_sci_power_domain_of_xlate, diff --git a/include/power-domain-uclass.h b/include/power-domain-uclass.h index acf749b38e..bd9906b2e7 100644 --- a/include/power-domain-uclass.h +++ b/include/power-domain-uclass.h @@ -54,14 +54,14 @@ struct power_domain_ops { */ int (*request)(struct power_domain *power_domain); /** - * rfree - Free a previously requested power domain. + * free - Free a previously requested power domain. * * This is the implementation of the client power_domain_free() API. * * @power_domain: The power domain to free. * @return 0 if OK, or a negative error code. */ - int (*rfree)(struct power_domain *power_domain); + int (*free)(struct power_domain *power_domain); /** * on - Power on a power domain. * From patchwork Wed Feb 19 19:39:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Goldschmidt X-Patchwork-Id: 236604 List-Id: U-Boot discussion From: simon.k.r.goldschmidt at gmail.com (Simon Goldschmidt) Date: Wed, 19 Feb 2020 20:39:34 +0100 Subject: [PATCH 8/8] Revert "mailbox: Rename free() to rfree()" In-Reply-To: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> References: <20200219193934.28456-1-simon.k.r.goldschmidt@gmail.com> Message-ID: <20200219193934.28456-9-simon.k.r.goldschmidt@gmail.com> This reverts commit cc92c3cc68a9053f53b2814e9233d86553cc998e. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- drivers/mailbox/k3-sec-proxy.c | 2 +- drivers/mailbox/mailbox-uclass.c | 4 ++-- drivers/mailbox/sandbox-mbox.c | 2 +- drivers/mailbox/stm32-ipcc.c | 2 +- drivers/mailbox/tegra-hsp.c | 2 +- include/mailbox-uclass.h | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c index a560209f03..0546752f5f 100644 --- a/drivers/mailbox/k3-sec-proxy.c +++ b/drivers/mailbox/k3-sec-proxy.c @@ -293,7 +293,7 @@ static int k3_sec_proxy_recv(struct mbox_chan *chan, void *data) struct mbox_ops k3_sec_proxy_mbox_ops = { .of_xlate = k3_sec_proxy_of_xlate, .request = k3_sec_proxy_request, - .rfree = k3_sec_proxy_free, + .free = k3_sec_proxy_free, .send = k3_sec_proxy_send, .recv = k3_sec_proxy_recv, }; diff --git a/drivers/mailbox/mailbox-uclass.c b/drivers/mailbox/mailbox-uclass.c index 291f5c218e..f408f05cf9 100644 --- a/drivers/mailbox/mailbox-uclass.c +++ b/drivers/mailbox/mailbox-uclass.c @@ -106,8 +106,8 @@ int mbox_free(struct mbox_chan *chan) debug("%s(chan=%p)\n", __func__, chan); - if (ops->rfree) - return ops->rfree(chan); + if (ops->free) + return ops->free(chan); return 0; } diff --git a/drivers/mailbox/sandbox-mbox.c b/drivers/mailbox/sandbox-mbox.c index 25e23eb05b..0f09dfa951 100644 --- a/drivers/mailbox/sandbox-mbox.c +++ b/drivers/mailbox/sandbox-mbox.c @@ -88,7 +88,7 @@ static const struct udevice_id sandbox_mbox_ids[] = { struct mbox_ops sandbox_mbox_mbox_ops = { .request = sandbox_mbox_request, - .rfree = sandbox_mbox_free, + .free = sandbox_mbox_free, .send = sandbox_mbox_send, .recv = sandbox_mbox_recv, }; diff --git a/drivers/mailbox/stm32-ipcc.c b/drivers/mailbox/stm32-ipcc.c index 13e642ab70..c58d9fa001 100644 --- a/drivers/mailbox/stm32-ipcc.c +++ b/drivers/mailbox/stm32-ipcc.c @@ -154,7 +154,7 @@ static const struct udevice_id stm32_ipcc_ids[] = { struct mbox_ops stm32_ipcc_mbox_ops = { .request = stm32_ipcc_request, - .rfree = stm32_ipcc_free, + .free = stm32_ipcc_free, .send = stm32_ipcc_send, .recv = stm32_ipcc_recv, }; diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c index 60f6a38321..00fc3972f9 100644 --- a/drivers/mailbox/tegra-hsp.c +++ b/drivers/mailbox/tegra-hsp.c @@ -176,7 +176,7 @@ static const struct udevice_id tegra_hsp_ids[] = { struct mbox_ops tegra_hsp_mbox_ops = { .of_xlate = tegra_hsp_of_xlate, .request = tegra_hsp_request, - .rfree = tegra_hsp_free, + .free = tegra_hsp_free, .send = tegra_hsp_send, .recv = tegra_hsp_recv, }; diff --git a/include/mailbox-uclass.h b/include/mailbox-uclass.h index 3c60c76506..e0618aad97 100644 --- a/include/mailbox-uclass.h +++ b/include/mailbox-uclass.h @@ -49,14 +49,14 @@ struct mbox_ops { */ int (*request)(struct mbox_chan *chan); /** - * rfree - Free a previously requested channel. + * free - Free a previously requested channel. * * This is the implementation of the client mbox_free() API. * * @chan: The channel to free. * @return 0 if OK, or a negative error code. */ - int (*rfree)(struct mbox_chan *chan); + int (*free)(struct mbox_chan *chan); /** * send - Send a message over a mailbox channel *