aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/debugfs.c
diff options
context:
space:
mode:
authorJohn Youn <John.Youn@synopsys.com>2017-01-17 23:30:27 -0500
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-01-24 04:04:18 -0500
commit9da5197475a09e51a467388308f14dcbdcee8ba9 (patch)
treeb1c4aa514bacc1abbd33b6cdffcb04db3e0b1908 /drivers/usb/dwc2/debugfs.c
parent33e4c1a9987a1fc3b42c3b534100b5b006d55c61 (diff)
usb: dwc2: Cleanup some checkpatch issues
This commmit is the result of running checkpatch --fix. The results were verified for correctness. Some of the fixes result in line over 80 char which we will fix manually later. The following is a summary of what was done by checkpatch: * Remove externs on function prototypes. * Replace symbolic permissions with octal. * Align code to open parens. * Replace 'unsigned' with 'unsigned int'. * Remove unneccessary blank lines. * Add blank lines after declarations. * Add spaces around operators. * Remove unnecessary spaces after casts. * Replace 'x == NULL' with '!x'. * Replace kzalloc() with kcalloc(). * Concatenate multi-line strings. * Use the BIT() macro. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/debugfs.c')
-rw-r--r--drivers/usb/dwc2/debugfs.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/usb/dwc2/debugfs.c b/drivers/usb/dwc2/debugfs.c
index 0a130916a91c..cad621f02972 100644
--- a/drivers/usb/dwc2/debugfs.c
+++ b/drivers/usb/dwc2/debugfs.c
@@ -137,7 +137,7 @@ static int state_show(struct seq_file *seq, void *v)
137 int idx; 137 int idx;
138 138
139 seq_printf(seq, "DCFG=0x%08x, DCTL=0x%08x, DSTS=0x%08x\n", 139 seq_printf(seq, "DCFG=0x%08x, DCTL=0x%08x, DSTS=0x%08x\n",
140 dwc2_readl(regs + DCFG), 140 dwc2_readl(regs + DCFG),
141 dwc2_readl(regs + DCTL), 141 dwc2_readl(regs + DCTL),
142 dwc2_readl(regs + DSTS)); 142 dwc2_readl(regs + DSTS));
143 143
@@ -338,23 +338,23 @@ static void dwc2_hsotg_create_debug(struct dwc2_hsotg *hsotg)
338{ 338{
339 struct dentry *root; 339 struct dentry *root;
340 struct dentry *file; 340 struct dentry *file;
341 unsigned epidx; 341 unsigned int epidx;
342 342
343 root = hsotg->debug_root; 343 root = hsotg->debug_root;
344 344
345 /* create general state file */ 345 /* create general state file */
346 346
347 file = debugfs_create_file("state", S_IRUGO, root, hsotg, &state_fops); 347 file = debugfs_create_file("state", 0444, root, hsotg, &state_fops);
348 if (IS_ERR(file)) 348 if (IS_ERR(file))
349 dev_err(hsotg->dev, "%s: failed to create state\n", __func__); 349 dev_err(hsotg->dev, "%s: failed to create state\n", __func__);
350 350
351 file = debugfs_create_file("testmode", S_IRUGO | S_IWUSR, root, hsotg, 351 file = debugfs_create_file("testmode", 0644, root, hsotg,
352 &testmode_fops); 352 &testmode_fops);
353 if (IS_ERR(file)) 353 if (IS_ERR(file))
354 dev_err(hsotg->dev, "%s: failed to create testmode\n", 354 dev_err(hsotg->dev, "%s: failed to create testmode\n",
355 __func__); 355 __func__);
356 356
357 file = debugfs_create_file("fifo", S_IRUGO, root, hsotg, &fifo_fops); 357 file = debugfs_create_file("fifo", 0444, root, hsotg, &fifo_fops);
358 if (IS_ERR(file)) 358 if (IS_ERR(file))
359 dev_err(hsotg->dev, "%s: failed to create fifo\n", __func__); 359 dev_err(hsotg->dev, "%s: failed to create fifo\n", __func__);
360 360
@@ -364,8 +364,8 @@ static void dwc2_hsotg_create_debug(struct dwc2_hsotg *hsotg)
364 364
365 ep = hsotg->eps_out[epidx]; 365 ep = hsotg->eps_out[epidx];
366 if (ep) { 366 if (ep) {
367 file = debugfs_create_file(ep->name, S_IRUGO, 367 file = debugfs_create_file(ep->name, 0444,
368 root, ep, &ep_fops); 368 root, ep, &ep_fops);
369 if (IS_ERR(file)) 369 if (IS_ERR(file))
370 dev_err(hsotg->dev, "failed to create %s debug file\n", 370 dev_err(hsotg->dev, "failed to create %s debug file\n",
371 ep->name); 371 ep->name);
@@ -377,8 +377,8 @@ static void dwc2_hsotg_create_debug(struct dwc2_hsotg *hsotg)
377 377
378 ep = hsotg->eps_in[epidx]; 378 ep = hsotg->eps_in[epidx];
379 if (ep) { 379 if (ep) {
380 file = debugfs_create_file(ep->name, S_IRUGO, 380 file = debugfs_create_file(ep->name, 0444,
381 root, ep, &ep_fops); 381 root, ep, &ep_fops);
382 if (IS_ERR(file)) 382 if (IS_ERR(file))
383 dev_err(hsotg->dev, "failed to create %s debug file\n", 383 dev_err(hsotg->dev, "failed to create %s debug file\n",
384 ep->name); 384 ep->name);
@@ -750,8 +750,8 @@ int dwc2_debugfs_init(struct dwc2_hsotg *hsotg)
750 hsotg->regset->nregs = ARRAY_SIZE(dwc2_regs); 750 hsotg->regset->nregs = ARRAY_SIZE(dwc2_regs);
751 hsotg->regset->base = hsotg->regs; 751 hsotg->regset->base = hsotg->regs;
752 752
753 file = debugfs_create_regset32("regdump", S_IRUGO, hsotg->debug_root, 753 file = debugfs_create_regset32("regdump", 0444, hsotg->debug_root,
754 hsotg->regset); 754 hsotg->regset);
755 if (!file) { 755 if (!file) {
756 ret = -ENOMEM; 756 ret = -ENOMEM;
757 goto err1; 757 goto err1;