aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-dbg.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/usb/host/ehci-dbg.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'drivers/usb/host/ehci-dbg.c')
-rw-r--r--drivers/usb/host/ehci-dbg.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
index 76b7fd2d838a..40a844c1dbb4 100644
--- a/drivers/usb/host/ehci-dbg.c
+++ b/drivers/usb/host/ehci-dbg.c
@@ -28,11 +28,9 @@
28 dev_warn (ehci_to_hcd(ehci)->self.controller , fmt , ## args ) 28 dev_warn (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
29 29
30#ifdef VERBOSE_DEBUG 30#ifdef VERBOSE_DEBUG
31# define vdbg dbg
32# define ehci_vdbg ehci_dbg 31# define ehci_vdbg ehci_dbg
33#else 32#else
34# define vdbg(fmt,args...) do { } while (0) 33 static inline void ehci_vdbg(struct ehci_hcd *ehci, ...) {}
35# define ehci_vdbg(ehci, fmt, args...) do { } while (0)
36#endif 34#endif
37 35
38#ifdef DEBUG 36#ifdef DEBUG
@@ -369,18 +367,21 @@ static const struct file_operations debug_async_fops = {
369 .open = debug_async_open, 367 .open = debug_async_open,
370 .read = debug_output, 368 .read = debug_output,
371 .release = debug_close, 369 .release = debug_close,
370 .llseek = default_llseek,
372}; 371};
373static const struct file_operations debug_periodic_fops = { 372static const struct file_operations debug_periodic_fops = {
374 .owner = THIS_MODULE, 373 .owner = THIS_MODULE,
375 .open = debug_periodic_open, 374 .open = debug_periodic_open,
376 .read = debug_output, 375 .read = debug_output,
377 .release = debug_close, 376 .release = debug_close,
377 .llseek = default_llseek,
378}; 378};
379static const struct file_operations debug_registers_fops = { 379static const struct file_operations debug_registers_fops = {
380 .owner = THIS_MODULE, 380 .owner = THIS_MODULE,
381 .open = debug_registers_open, 381 .open = debug_registers_open,
382 .read = debug_output, 382 .read = debug_output,
383 .release = debug_close, 383 .release = debug_close,
384 .llseek = default_llseek,
384}; 385};
385static const struct file_operations debug_lpm_fops = { 386static const struct file_operations debug_lpm_fops = {
386 .owner = THIS_MODULE, 387 .owner = THIS_MODULE,
@@ -388,6 +389,7 @@ static const struct file_operations debug_lpm_fops = {
388 .read = debug_lpm_read, 389 .read = debug_lpm_read,
389 .write = debug_lpm_write, 390 .write = debug_lpm_write,
390 .release = debug_lpm_close, 391 .release = debug_lpm_close,
392 .llseek = noop_llseek,
391}; 393};
392 394
393static struct dentry *ehci_debug_root; 395static struct dentry *ehci_debug_root;
@@ -724,7 +726,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
724 } 726 }
725 727
726 /* Capability Registers */ 728 /* Capability Registers */
727 i = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase)); 729 i = HC_VERSION(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase));
728 temp = scnprintf (next, size, 730 temp = scnprintf (next, size,
729 "bus %s, device %s\n" 731 "bus %s, device %s\n"
730 "%s\n" 732 "%s\n"
@@ -875,7 +877,7 @@ static int fill_buffer(struct debug_buffer *buf)
875 int ret = 0; 877 int ret = 0;
876 878
877 if (!buf->output_buf) 879 if (!buf->output_buf)
878 buf->output_buf = (char *)vmalloc(buf->alloc_size); 880 buf->output_buf = vmalloc(buf->alloc_size);
879 881
880 if (!buf->output_buf) { 882 if (!buf->output_buf) {
881 ret = -ENOMEM; 883 ret = -ENOMEM;
@@ -1063,7 +1065,7 @@ static inline void create_debug_files (struct ehci_hcd *ehci)
1063 &debug_registers_fops)) 1065 &debug_registers_fops))
1064 goto file_error; 1066 goto file_error;
1065 1067
1066 if (!debugfs_create_file("lpm", S_IRUGO|S_IWUGO, ehci->debug_dir, bus, 1068 if (!debugfs_create_file("lpm", S_IRUGO|S_IWUSR, ehci->debug_dir, bus,
1067 &debug_lpm_fops)) 1069 &debug_lpm_fops))
1068 goto file_error; 1070 goto file_error;
1069 1071