提交 f61e761e 编写于 作者: D David Woodhouse 提交者: David Woodhouse

cyclades: treat firmware data as const

Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
上级 8187b4fb
...@@ -4668,7 +4668,7 @@ static inline int __devinit cyc_isfwstr(const char *str, unsigned int size) ...@@ -4668,7 +4668,7 @@ static inline int __devinit cyc_isfwstr(const char *str, unsigned int size)
return 0; return 0;
} }
static inline void __devinit cyz_fpga_copy(void __iomem *fpga, u8 *data, static inline void __devinit cyz_fpga_copy(void __iomem *fpga, const u8 *data,
unsigned int size) unsigned int size)
{ {
for (; size > 0; size--) { for (; size > 0; size--) {
...@@ -4701,10 +4701,10 @@ static int __devinit __cyz_load_fw(const struct firmware *fw, ...@@ -4701,10 +4701,10 @@ static int __devinit __cyz_load_fw(const struct firmware *fw,
const char *name, const u32 mailbox, void __iomem *base, const char *name, const u32 mailbox, void __iomem *base,
void __iomem *fpga) void __iomem *fpga)
{ {
void *ptr = fw->data; const void *ptr = fw->data;
struct zfile_header *h = ptr; const struct zfile_header *h = ptr;
struct zfile_config *c, *cs; const struct zfile_config *c, *cs;
struct zfile_block *b, *bs; const struct zfile_block *b, *bs;
unsigned int a, tmp, len = fw->size; unsigned int a, tmp, len = fw->size;
#define BAD_FW KERN_ERR "Bad firmware: " #define BAD_FW KERN_ERR "Bad firmware: "
if (len < sizeof(*h)) { if (len < sizeof(*h)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册