Skip to content

Commit 540c830

Browse files
committed
firmware: imx: remove duplicate scmi_imx_misc_ctrl_get()
These two functions have a stub definition when CONFIG_IMX_SCMI_MISC_EXT is not set, which conflict with the global definition: In file included from drivers/firmware/imx/sm-misc.c:6: include/linux/firmware/imx/sm.h:30:1: error: expected identifier or '(' before '{' token 30 | { | ^ drivers/firmware/imx/sm-misc.c:26:5: error: redefinition of 'scmi_imx_misc_ctrl_get' 26 | int scmi_imx_misc_ctrl_get(u32 id, u32 *num, u32 *val) | ^~~~~~~~~~~~~~~~~~~~~~ include/linux/firmware/imx/sm.h:24:19: note: previous definition of 'scmi_imx_misc_ctrl_get' with type 'int(u32, u32 *, u32 *)' {aka 'int(unsigned int, unsigned int *, unsigned int *)'} 24 | static inline int scmi_imx_misc_ctrl_get(u32 id, u32 *num, u32 *val) | ^~~~~~~~~~~~~~~~~~~~~~ There is no real need for the #ifdef, and removing this avoids the build failure. Fixes: 0b4f8a6 ("firmware: imx: Add i.MX95 MISC driver") Link: https://lore.kernel.org/r/20240909203023.1275232-1-arnd@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent fc282a6 commit 540c830

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

  • include/linux/firmware/imx

include/linux/firmware/imx/sm.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,7 @@
1717
#define SCMI_IMX_CTRL_SAI4_MCLK 4 /* WAKE SAI4 MCLK */
1818
#define SCMI_IMX_CTRL_SAI5_MCLK 5 /* WAKE SAI5 MCLK */
1919

20-
#if IS_ENABLED(CONFIG_IMX_SCMI_MISC_EXT)
2120
int scmi_imx_misc_ctrl_get(u32 id, u32 *num, u32 *val);
2221
int scmi_imx_misc_ctrl_set(u32 id, u32 val);
23-
#else
24-
static inline int scmi_imx_misc_ctrl_get(u32 id, u32 *num, u32 *val)
25-
{
26-
return -EOPNOTSUPP;
27-
}
2822

29-
static inline int scmi_imx_misc_ctrl_set(u32 id, u32 val);
30-
{
31-
return -EOPNOTSUPP;
32-
}
33-
#endif
3423
#endif

0 commit comments

Comments
 (0)