diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2008-07-27 15:36:56 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2008-07-27 15:36:56 +0000 |
commit | ddedba131e97ab0ba720bd4f226e9cd4c353283e (patch) | |
tree | c24fd007781521961a319035d72c0e0b9d3bada8 | |
parent | a5016646fc01df9e2e85b3fa0f92e81a7e3ed7c1 (diff) | |
download | upstream-ddedba131e97ab0ba720bd4f226e9cd4c353283e.tar.gz upstream-ddedba131e97ab0ba720bd4f226e9cd4c353283e.tar.bz2 upstream-ddedba131e97ab0ba720bd4f226e9cd4c353283e.zip |
[adm5120] fix a bug in the USB driver debug code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11961 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c b/target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c index a6eb67cb6b..f3b55f6714 100644 --- a/target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c +++ b/target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c @@ -393,7 +393,6 @@ static inline void remove_debug_files(struct admhcd *bus) { } static int debug_async_open(struct inode *, struct file *); static int debug_periodic_open(struct inode *, struct file *); static int debug_registers_open(struct inode *, struct file *); -static int debug_async_open(struct inode *, struct file *); static ssize_t debug_output(struct file*, char __user*, size_t, loff_t*); static int debug_close(struct inode *, struct file *); @@ -429,7 +428,8 @@ struct debug_buffer { static ssize_t show_list(struct admhcd *ahcd, char *buf, size_t count, struct ed *ed) { - unsigned temp, size = count; + unsigned temp; + unsigned size = count; if (!ed) return 0; @@ -488,6 +488,7 @@ show_list(struct admhcd *ahcd, char *buf, size_t count, struct ed *ed) ed = ed->ed_next; } + return count - size; } @@ -503,9 +504,8 @@ static ssize_t fill_async_buffer(struct debug_buffer *buf) hcd = bus_to_hcd(bus); ahcd = hcd_to_admhcd(hcd); - /* display control and bulk lists together, for simplicity */ spin_lock_irqsave(&ahcd->lock, flags); - temp = show_list(ahcd, buf->page, buf->count, ahcd->ed_head); + temp = show_list(ahcd, buf->page, PAGE_SIZE, ahcd->ed_head); spin_unlock_irqrestore(&ahcd->lock, flags); return temp; |