]> git.baikalelectronics.ru Git - kernel.git/commit
staging: unisys: visorchannel_read(): Use memcpy_fromio() directly
authorJes Sorensen <Jes.Sorensen@redhat.com>
Tue, 5 May 2015 22:36:55 +0000 (18:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 May 2015 13:27:29 +0000 (15:27 +0200)
commit941096dc35b8e13624a1babe7502be26d48c6f39
tree9a4c66f43c89e53b919d67239339b6822d4e43bb
parentd7c36c060eb2bce1c30e057479543d727ec33b8f
staging: unisys: visorchannel_read(): Use memcpy_fromio() directly

Note, this changes the behavior of visorchannel_read(). The old code
would return the channel header, if the offset argument was 0, and the
caller tried to read beyond the size of the visorchannel. Note this
only worked for offset == 0, but not for
(offset > 0) && (offset < header_size), which was inconsistent.

The new implementation returns an error if someone tries to read
beyond the visorchannel size.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorchannel.c