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:
Steven Slupsky 2020-02-20 08:06:19 -07:00 committed by Anas Nashif
commit e55f1987a0

View file

@ -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