Alias imx5*_bbu_internal_spi_i2c_register_handler() to a common function. Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> --- arch/arm/mach-imx/imx-bbu-internal.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-imx/imx-bbu-internal.c b/arch/arm/mach-imx/imx-bbu-internal.c index e7fbe3e16..318efd88e 100644 --- a/arch/arm/mach-imx/imx-bbu-internal.c +++ b/arch/arm/mach-imx/imx-bbu-internal.c @@ -449,8 +449,10 @@ imx_bbu_internal_mmc_register_handler(const char *name, const char *devicefile, return __register_handler(imx_handler); } -int imx51_bbu_internal_spi_i2c_register_handler(const char *name, - const char *devicefile, unsigned long flags) +static int +imx_bbu_internal_spi_i2c_register_handler(const char *name, + const char *devicefile, + unsigned long flags) { struct imx_internal_bbu_handler *imx_handler; @@ -461,6 +463,11 @@ int imx51_bbu_internal_spi_i2c_register_handler(const char *name, return __register_handler(imx_handler); } +int imx51_bbu_internal_spi_i2c_register_handler(const char *name, + const char *devicefile, + unsigned long flags) + __alias(imx_bbu_internal_spi_i2c_register_handler); + /* * Register an i.MX51 internal boot update handler for MMC/SD */ @@ -485,15 +492,7 @@ int imx53_bbu_internal_mmc_register_handler(const char *name, int imx53_bbu_internal_spi_i2c_register_handler(const char *name, const char *devicefile, unsigned long flags) -{ - struct imx_internal_bbu_handler *imx_handler; - - imx_handler = __init_handler(name, devicefile, flags | - IMX_INTERNAL_FLAG_ERASE); - imx_handler->flash_header_offset = FLASH_HEADER_OFFSET_MMC; - - return __register_handler(imx_handler); -} + __alias(imx_bbu_internal_spi_i2c_register_handler); /* * Register an i.MX53 internal boot update handler for NAND -- 2.17.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox