Skip to contentSkip to conversation

char: xillybus: Fix internal data structure initialization

PATCH In review Eli Billauer 2 participants 3 messages Feb 23, 2016

Subsystems (2)
lore
Share & tools
lore

Eli Billauer

author maintainer
#0 lore raw

PATCH 1/1 char: xillybus: Fix internal data structure initialization

---
 drivers/char/xillybus/xillybus_core.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/char/xillybus/xillybus_core.c +3 -1
index 77d6c12..dcd19f3 100644
@@ -509,7 +509,7 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
 			channel->log2_element_size = ((format > 2) ?
 						      2 : format);
 
-			bytebufsize = channel->rd_buf_size = bufsize *
+			bytebufsize = bufsize *
 				(1 << channel->log2_element_size);
 
 			buffers = devm_kcalloc(dev, bufnum,
@@ -523,6 +523,7 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
 
 		if (!is_writebuf) {
 			channel->num_rd_buffers = bufnum;
+			channel->rd_buf_size = bytebufsize;
 			channel->rd_allow_partial = allowpartial;
 			channel->rd_synchronous = synchronous;
 			channel->rd_exclusive_open = exclusive_open;
@@ -533,6 +534,7 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
 						   bufnum, bytebufsize);
 		} else if (channelnum > 0) {
 			channel->num_wr_buffers = bufnum;
+			channel->wr_buf_size = bytebufsize;
 
 			channel->seekable = seekable;
 			channel->wr_supports_nonempty = supports_nonempty;
Signature · 1 line
1.7.2.3
maintainer
#1 lore raw
Quoted 5 lines · Eli Billauer
---
 drivers/char/xillybus/xillybus_core.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

I can't accept patches without any changelog information :(

author maintainer
#2 lore raw

Oops. Didn't know it was required.

I'll resubmit this patch soon. Sorry.

Eli

Quoted 10 lines · Greg KH
Quoted 5 lines · Eli Billauer
---
  drivers/char/xillybus/xillybus_core.c |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)

I can't accept patches without any changelog information :(