USB: ohci-s3c2410: fix checkpatch errors and warnings
This patch fixes the checkpatch errors ans warnings listed below: ERROR: do not use assignment in if condition WARNING: line over 80 characters WARNING: braces {} are not necessary for single statement blocks WARNING: space prohibited between function name and open parenthesis '(' Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
a7535ac054
commit
7af85a8587
1 changed files with 23 additions and 23 deletions
|
@ -56,11 +56,10 @@ static void s3c2410_start_hc(struct platform_device *dev, struct usb_hcd *hcd)
|
||||||
info->hcd = hcd;
|
info->hcd = hcd;
|
||||||
info->report_oc = s3c2410_hcd_oc;
|
info->report_oc = s3c2410_hcd_oc;
|
||||||
|
|
||||||
if (info->enable_oc != NULL) {
|
if (info->enable_oc != NULL)
|
||||||
(info->enable_oc)(info, 1);
|
(info->enable_oc)(info, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void s3c2410_stop_hc(struct platform_device *dev)
|
static void s3c2410_stop_hc(struct platform_device *dev)
|
||||||
{
|
{
|
||||||
|
@ -72,10 +71,9 @@ static void s3c2410_stop_hc(struct platform_device *dev)
|
||||||
info->report_oc = NULL;
|
info->report_oc = NULL;
|
||||||
info->hcd = NULL;
|
info->hcd = NULL;
|
||||||
|
|
||||||
if (info->enable_oc != NULL) {
|
if (info->enable_oc != NULL)
|
||||||
(info->enable_oc)(info, 0);
|
(info->enable_oc)(info, 0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
clk_disable(clk);
|
clk_disable(clk);
|
||||||
clk_disable(usb_clk);
|
clk_disable(usb_clk);
|
||||||
|
@ -199,9 +197,8 @@ static int ohci_s3c2410_hub_control (
|
||||||
dev_dbg(hcd->self.controller,
|
dev_dbg(hcd->self.controller,
|
||||||
"ClearPortFeature: OVER_CURRENT\n");
|
"ClearPortFeature: OVER_CURRENT\n");
|
||||||
|
|
||||||
if (valid_port(wIndex)) {
|
if (valid_port(wIndex))
|
||||||
info->port[wIndex-1].oc_status = 0;
|
info->port[wIndex-1].oc_status = 0;
|
||||||
}
|
|
||||||
|
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
@ -242,8 +239,11 @@ static int ohci_s3c2410_hub_control (
|
||||||
desc->wHubCharacteristics |= cpu_to_le16(0x0001);
|
desc->wHubCharacteristics |= cpu_to_le16(0x0001);
|
||||||
|
|
||||||
if (info->enable_oc) {
|
if (info->enable_oc) {
|
||||||
desc->wHubCharacteristics &= ~cpu_to_le16(HUB_CHAR_OCPM);
|
desc->wHubCharacteristics &= ~cpu_to_le16(
|
||||||
desc->wHubCharacteristics |= cpu_to_le16(0x0008|0x0001);
|
HUB_CHAR_OCPM);
|
||||||
|
desc->wHubCharacteristics |= cpu_to_le16(
|
||||||
|
0x0008 |
|
||||||
|
0x0001);
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n",
|
dev_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n",
|
||||||
|
@ -257,15 +257,13 @@ static int ohci_s3c2410_hub_control (
|
||||||
dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex);
|
dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex);
|
||||||
|
|
||||||
if (valid_port(wIndex)) {
|
if (valid_port(wIndex)) {
|
||||||
if (info->port[wIndex-1].oc_changed) {
|
if (info->port[wIndex-1].oc_changed)
|
||||||
*data |= cpu_to_le32(RH_PS_OCIC);
|
*data |= cpu_to_le32(RH_PS_OCIC);
|
||||||
}
|
|
||||||
|
|
||||||
if (info->port[wIndex-1].oc_status) {
|
if (info->port[wIndex-1].oc_status)
|
||||||
*data |= cpu_to_le32(RH_PS_POCI);
|
*data |= cpu_to_le32(RH_PS_POCI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -416,10 +414,12 @@ ohci_s3c2410_start (struct usb_hcd *hcd)
|
||||||
struct ohci_hcd *ohci = hcd_to_ohci(hcd);
|
struct ohci_hcd *ohci = hcd_to_ohci(hcd);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if ((ret = ohci_init(ohci)) < 0)
|
ret = ohci_init(ohci);
|
||||||
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if ((ret = ohci_run (ohci)) < 0) {
|
ret = ohci_run(ohci);
|
||||||
|
if (ret < 0) {
|
||||||
err("can't start %s", hcd->self.bus_name);
|
err("can't start %s", hcd->self.bus_name);
|
||||||
ohci_stop(hcd);
|
ohci_stop(hcd);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Reference in a new issue