Skip to content
Commit 270579d9 authored by Michal Sojka's avatar Michal Sojka Committed by Greg Kroah-Hartman
Browse files

uio_mf624: Align memory regions to page size and set correct offsets



mf624 card has its registers not aligned to pages. Since commit
b6550287 ("uio: we cannot mmap unaligned page contents") mmap()ing
mf624 registers fails, because now the uio drivers must set
uio_mem->addr to be page-aligned.

We align the address here and set the newly introduced offs field to
the offset of the mf264 registers within the page so that userspace
can find the address of the mmap()ed register by reading
/sys/class/uio/uio?/maps/map?/offset.

Tested with real mf624 card.

Signed-off-by: default avatarMichal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a15d2ddb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment