drivers: flash: sam0: fix unaligned memory read
Use the UNALIGNED_GET() macro instead of the flash_sam0_read_unaigned_u32() function to ensure word alignment of the source address. Signed-off-by: Steven Slupsky <sslupsky@gmail.com> drivers: flash: sam0: fix whitespace Fix checkpass whitespace error. Signed-off-by: Steven Slupsky <sslupsky@gmail.com>
This commit is contained in:
parent
05b072f8d1
commit
e55f1987a0
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ static int flash_sam0_write_page(struct device *dev, off_t offset,
|
|||
|
||||
/* Ensure writes happen 32 bits at a time. */
|
||||
for (; src != end; src++, dst++) {
|
||||
*dst = *src;
|
||||
*dst = UNALIGNED_GET((u32_t *)src);
|
||||
}
|
||||
|
||||
#ifdef NVMCTRL_CTRLA_CMD_WP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue