mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 16:15:11 +00:00
mtd: rawnand: ingenic: fix empty stub helper definitions
[ Upstream commit650a8884a3
] A few functions provide an empty interface definition when CONFIG_MTD_NAND_INGENIC_ECC is disabled, but they are accidentally defined as global functions in the header: drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:39:5: error: no previous prototype for 'ingenic_ecc_calculate' drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:46:5: error: no previous prototype for 'ingenic_ecc_correct' drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:53:6: error: no previous prototype for 'ingenic_ecc_release' drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:57:21: error: no previous prototype for 'of_ingenic_ecc_get' Turn them into 'static inline' definitions instead. Fixes:15de8c6efd
("mtd: rawnand: ingenic: Separate top-level and SoC specific code") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230516202133.559488-1-arnd@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
789394f1df
commit
3cf7747414
1 changed files with 4 additions and 4 deletions
|
@ -36,25 +36,25 @@ int ingenic_ecc_correct(struct ingenic_ecc *ecc,
|
|||
void ingenic_ecc_release(struct ingenic_ecc *ecc);
|
||||
struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np);
|
||||
#else /* CONFIG_MTD_NAND_INGENIC_ECC */
|
||||
int ingenic_ecc_calculate(struct ingenic_ecc *ecc,
|
||||
static inline int ingenic_ecc_calculate(struct ingenic_ecc *ecc,
|
||||
struct ingenic_ecc_params *params,
|
||||
const u8 *buf, u8 *ecc_code)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
int ingenic_ecc_correct(struct ingenic_ecc *ecc,
|
||||
static inline int ingenic_ecc_correct(struct ingenic_ecc *ecc,
|
||||
struct ingenic_ecc_params *params, u8 *buf,
|
||||
u8 *ecc_code)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
void ingenic_ecc_release(struct ingenic_ecc *ecc)
|
||||
static inline void ingenic_ecc_release(struct ingenic_ecc *ecc)
|
||||
{
|
||||
}
|
||||
|
||||
struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np)
|
||||
static inline struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np)
|
||||
{
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue