mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
firmware: make fw->data const
In preparation for supporting firmware files linked into the static kernel, make fw->data const to ensure that users aren't modifying it (so that we can pass a pointer to the original in-kernel copy, rather than having to copy it). Signed-off-by: David Woodhouse <[email protected]>
This commit is contained in:
parent
fd4f80de46
commit
b7a39bd0af
2 changed files with 2 additions and 2 deletions
|
|
@ -257,7 +257,7 @@ firmware_data_write(struct kobject *kobj, struct bin_attribute *bin_attr,
|
|||
if (retval)
|
||||
goto out;
|
||||
|
||||
memcpy(fw->data + offset, buffer, count);
|
||||
memcpy((u8 *)fw->data + offset, buffer, count);
|
||||
|
||||
fw->size = max_t(size_t, offset + count, fw->size);
|
||||
retval = count;
|
||||
|
|
|
|||
Loading…
Reference in a new issue