aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uio/uio_hv_generic.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2018-04-16 11:19:24 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-23 12:43:48 +0200
commit6e3d66b80f670fdc64b9a120362a9f94b0494621 (patch)
tree4c950ed1e942d73a94e44c35dcf47b79c0cf8792 /drivers/uio/uio_hv_generic.c
parentANDROID: binder: prevent transactions into own process. (diff)
downloadlinux-dev-6e3d66b80f670fdc64b9a120362a9f94b0494621.tar.xz
linux-dev-6e3d66b80f670fdc64b9a120362a9f94b0494621.zip
uio_hv_generic: set size of ring buffer attribute
The original code had ring size as a module parameter, but then it was made a fixed value. The code to set the size of the ring buffer binary file was lost in the transistion. The size is needed by user mode driver to know the size of the ring buffer. Fixes: 37b96a4931db ("uio_hv_generic: support sub-channels") Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/uio/uio_hv_generic.c')
-rw-r--r--drivers/uio/uio_hv_generic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c
index f695a7e8c314..7ff659dff11d 100644
--- a/drivers/uio/uio_hv_generic.c
+++ b/drivers/uio/uio_hv_generic.c
@@ -171,12 +171,12 @@ static int hv_uio_ring_mmap(struct file *filp, struct kobject *kobj,
return 0;
}
-static struct bin_attribute ring_buffer_bin_attr __ro_after_init = {
+static const struct bin_attribute ring_buffer_bin_attr = {
.attr = {
.name = "ring",
.mode = 0600,
- /* size is set at init time */
},
+ .size = 2 * HV_RING_SIZE * PAGE_SIZE,
.mmap = hv_uio_ring_mmap,
};