Skip to content

Commit

Permalink
usb: dwc3: debugfs: remove unnecessary | operator
Browse files Browse the repository at this point in the history
Each role is mutually exclusive, the | operator is unnecessary. Remove
it.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
  • Loading branch information
Roger Quadros authored and Felipe Balbi committed Apr 11, 2017
1 parent 6b3261a commit b202c42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/dwc3/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,13 @@ static ssize_t dwc3_mode_write(struct file *file,
return -EFAULT;

if (!strncmp(buf, "host", 4))
mode |= DWC3_GCTL_PRTCAP_HOST;
mode = DWC3_GCTL_PRTCAP_HOST;

if (!strncmp(buf, "device", 6))
mode |= DWC3_GCTL_PRTCAP_DEVICE;
mode = DWC3_GCTL_PRTCAP_DEVICE;

if (!strncmp(buf, "otg", 3))
mode |= DWC3_GCTL_PRTCAP_OTG;
mode = DWC3_GCTL_PRTCAP_OTG;

if (mode) {
spin_lock_irqsave(&dwc->lock, flags);
Expand Down

0 comments on commit b202c42

Please sign in to comment.