Commit 93a9c901c88ba2b1bae9dd55e6243896b8a580f1
Committed by
David Woodhouse
1 parent
c2ba47d776
Exists in
master
and in
7 other branches
riptide: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Showing 1 changed file with 5 additions and 5 deletions Side-by-side Diff
sound/pci/riptide/riptide.c
... | ... | @@ -682,7 +682,7 @@ |
682 | 682 | }, |
683 | 683 | }; |
684 | 684 | |
685 | -static u32 atoh(unsigned char *in, unsigned int len) | |
685 | +static u32 atoh(const unsigned char *in, unsigned int len) | |
686 | 686 | { |
687 | 687 | u32 sum = 0; |
688 | 688 | unsigned int mult = 1; |
689 | 689 | |
... | ... | @@ -702,12 +702,12 @@ |
702 | 702 | return sum; |
703 | 703 | } |
704 | 704 | |
705 | -static int senddata(struct cmdif *cif, unsigned char *in, u32 offset) | |
705 | +static int senddata(struct cmdif *cif, const unsigned char *in, u32 offset) | |
706 | 706 | { |
707 | 707 | u32 addr; |
708 | 708 | u32 data; |
709 | 709 | u32 i; |
710 | - unsigned char *p; | |
710 | + const unsigned char *p; | |
711 | 711 | |
712 | 712 | i = atoh(&in[1], 2); |
713 | 713 | addr = offset + atoh(&in[3], 4); |
714 | 714 | |
... | ... | @@ -726,10 +726,10 @@ |
726 | 726 | return 0; |
727 | 727 | } |
728 | 728 | |
729 | -static int loadfirmware(struct cmdif *cif, unsigned char *img, | |
729 | +static int loadfirmware(struct cmdif *cif, const unsigned char *img, | |
730 | 730 | unsigned int size) |
731 | 731 | { |
732 | - unsigned char *in; | |
732 | + const unsigned char *in; | |
733 | 733 | u32 laddr, saddr, t, val; |
734 | 734 | int err = 0; |
735 | 735 |