mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 21:23:23 +00:00
media: s5p-mfc: constify s5p_mfc_hw_cmds structures
Static "s5p_mfc_hw_cmds" structures are not modified by the driver, so they can be made const for code safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
5451bbd3e3
commit
c76c43d778
@ -148,7 +148,7 @@ static int s5p_mfc_close_inst_cmd_v5(struct s5p_mfc_ctx *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize cmd function pointers for MFC v5 */
|
/* Initialize cmd function pointers for MFC v5 */
|
||||||
static struct s5p_mfc_hw_cmds s5p_mfc_cmds_v5 = {
|
static const struct s5p_mfc_hw_cmds s5p_mfc_cmds_v5 = {
|
||||||
.cmd_host2risc = s5p_mfc_cmd_host2risc_v5,
|
.cmd_host2risc = s5p_mfc_cmd_host2risc_v5,
|
||||||
.sys_init_cmd = s5p_mfc_sys_init_cmd_v5,
|
.sys_init_cmd = s5p_mfc_sys_init_cmd_v5,
|
||||||
.sleep_cmd = s5p_mfc_sleep_cmd_v5,
|
.sleep_cmd = s5p_mfc_sleep_cmd_v5,
|
||||||
@ -157,7 +157,7 @@ static struct s5p_mfc_hw_cmds s5p_mfc_cmds_v5 = {
|
|||||||
.close_inst_cmd = s5p_mfc_close_inst_cmd_v5,
|
.close_inst_cmd = s5p_mfc_close_inst_cmd_v5,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v5(void)
|
const struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v5(void)
|
||||||
{
|
{
|
||||||
return &s5p_mfc_cmds_v5;
|
return &s5p_mfc_cmds_v5;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,6 @@
|
|||||||
|
|
||||||
#include "s5p_mfc_common.h"
|
#include "s5p_mfc_common.h"
|
||||||
|
|
||||||
struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v5(void);
|
const struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v5(void);
|
||||||
|
|
||||||
#endif /* S5P_MFC_CMD_H_ */
|
#endif /* S5P_MFC_CMD_H_ */
|
||||||
|
@ -154,7 +154,7 @@ static int s5p_mfc_close_inst_cmd_v6(struct s5p_mfc_ctx *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize cmd function pointers for MFC v6 */
|
/* Initialize cmd function pointers for MFC v6 */
|
||||||
static struct s5p_mfc_hw_cmds s5p_mfc_cmds_v6 = {
|
static const struct s5p_mfc_hw_cmds s5p_mfc_cmds_v6 = {
|
||||||
.cmd_host2risc = s5p_mfc_cmd_host2risc_v6,
|
.cmd_host2risc = s5p_mfc_cmd_host2risc_v6,
|
||||||
.sys_init_cmd = s5p_mfc_sys_init_cmd_v6,
|
.sys_init_cmd = s5p_mfc_sys_init_cmd_v6,
|
||||||
.sleep_cmd = s5p_mfc_sleep_cmd_v6,
|
.sleep_cmd = s5p_mfc_sleep_cmd_v6,
|
||||||
@ -163,7 +163,7 @@ static struct s5p_mfc_hw_cmds s5p_mfc_cmds_v6 = {
|
|||||||
.close_inst_cmd = s5p_mfc_close_inst_cmd_v6,
|
.close_inst_cmd = s5p_mfc_close_inst_cmd_v6,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v6(void)
|
const struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v6(void)
|
||||||
{
|
{
|
||||||
return &s5p_mfc_cmds_v6;
|
return &s5p_mfc_cmds_v6;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,6 @@
|
|||||||
|
|
||||||
#include "s5p_mfc_common.h"
|
#include "s5p_mfc_common.h"
|
||||||
|
|
||||||
struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v6(void);
|
const struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v6(void);
|
||||||
|
|
||||||
#endif /* S5P_MFC_CMD_H_ */
|
#endif /* S5P_MFC_CMD_H_ */
|
||||||
|
@ -341,7 +341,7 @@ struct s5p_mfc_dev {
|
|||||||
struct s5p_mfc_priv_buf ctx_buf;
|
struct s5p_mfc_priv_buf ctx_buf;
|
||||||
int warn_start;
|
int warn_start;
|
||||||
struct s5p_mfc_hw_ops *mfc_ops;
|
struct s5p_mfc_hw_ops *mfc_ops;
|
||||||
struct s5p_mfc_hw_cmds *mfc_cmds;
|
const struct s5p_mfc_hw_cmds *mfc_cmds;
|
||||||
const struct s5p_mfc_regs *mfc_regs;
|
const struct s5p_mfc_regs *mfc_regs;
|
||||||
enum s5p_mfc_fw_ver fw_ver;
|
enum s5p_mfc_fw_ver fw_ver;
|
||||||
bool fw_get_done;
|
bool fw_get_done;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user