提交 ad44088f 编写于 作者: J Jes Sorensen 提交者: Greg Kroah-Hartman

staging: unisys: visorchannel_write(): Use memcpy_toio() directly

Signed-off-by: NJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 d24c3f07
......@@ -216,10 +216,15 @@ visorchannel_write(struct visorchannel *channel, ulong offset,
{
size_t size = sizeof(struct channel_header);
if (offset + nbytes > channel->memregion.nbytes)
return -EIO;
if (!offset && nbytes >= size)
memcpy(&channel->chan_hdr, local, size);
return visor_memregion_write(&channel->memregion,
offset, local, nbytes);
memcpy_toio(channel->memregion.mapped + offset, local, nbytes);
return 0;
}
EXPORT_SYMBOL_GPL(visorchannel_write);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册