diff options
author | Jingoo Han <jg1.han@samsung.com> | 2011-05-04 03:45:47 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-06 21:16:40 -0400 |
commit | 7af85a85878bd1a2695408e5856aba8ef9f71b60 (patch) | |
tree | fd3fcc590d35b8630d8a5fcac74431f89a3a8db9 /drivers/usb | |
parent | a7535ac05443f234b9c68389fc053976383feca4 (diff) |
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ohci-s3c2410.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c index 5837d218050d..e6e8d98b385b 100644 --- a/drivers/usb/host/ohci-s3c2410.c +++ b/drivers/usb/host/ohci-s3c2410.c | |||
@@ -56,9 +56,8 @@ static void s3c2410_start_hc(struct platform_device *dev, struct usb_hcd *hcd) | |||
56 | info->hcd = hcd; | 56 | info->hcd = hcd; |
57 | info->report_oc = s3c2410_hcd_oc; | 57 | info->report_oc = s3c2410_hcd_oc; |
58 | 58 | ||
59 | if (info->enable_oc != NULL) { | 59 | if (info->enable_oc != NULL) |
60 | (info->enable_oc)(info, 1); | 60 | (info->enable_oc)(info, 1); |
61 | } | ||
62 | } | 61 | } |
63 | } | 62 | } |
64 | 63 | ||
@@ -72,9 +71,8 @@ static void s3c2410_stop_hc(struct platform_device *dev) | |||
72 | info->report_oc = NULL; | 71 | info->report_oc = NULL; |
73 | info->hcd = NULL; | 72 | info->hcd = NULL; |
74 | 73 | ||
75 | if (info->enable_oc != NULL) { | 74 | if (info->enable_oc != NULL) |
76 | (info->enable_oc)(info, 0); | 75 | (info->enable_oc)(info, 0); |
77 | } | ||
78 | } | 76 | } |
79 | 77 | ||
80 | clk_disable(clk); | 78 | clk_disable(clk); |
@@ -88,14 +86,14 @@ static void s3c2410_stop_hc(struct platform_device *dev) | |||
88 | */ | 86 | */ |
89 | 87 | ||
90 | static int | 88 | static int |
91 | ohci_s3c2410_hub_status_data (struct usb_hcd *hcd, char *buf) | 89 | ohci_s3c2410_hub_status_data(struct usb_hcd *hcd, char *buf) |
92 | { | 90 | { |
93 | struct s3c2410_hcd_info *info = to_s3c2410_info(hcd); | 91 | struct s3c2410_hcd_info *info = to_s3c2410_info(hcd); |
94 | struct s3c2410_hcd_port *port; | 92 | struct s3c2410_hcd_port *port; |
95 | int orig; | 93 | int orig; |
96 | int portno; | 94 | int portno; |
97 | 95 | ||
98 | orig = ohci_hub_status_data (hcd, buf); | 96 | orig = ohci_hub_status_data(hcd, buf); |
99 | 97 | ||
100 | if (info == NULL) | 98 | if (info == NULL) |
101 | return orig; | 99 | return orig; |
@@ -145,7 +143,7 @@ static void s3c2410_usb_set_power(struct s3c2410_hcd_info *info, | |||
145 | * request. | 143 | * request. |
146 | */ | 144 | */ |
147 | 145 | ||
148 | static int ohci_s3c2410_hub_control ( | 146 | static int ohci_s3c2410_hub_control( |
149 | struct usb_hcd *hcd, | 147 | struct usb_hcd *hcd, |
150 | u16 typeReq, | 148 | u16 typeReq, |
151 | u16 wValue, | 149 | u16 wValue, |
@@ -199,9 +197,8 @@ static int ohci_s3c2410_hub_control ( | |||
199 | dev_dbg(hcd->self.controller, | 197 | dev_dbg(hcd->self.controller, |
200 | "ClearPortFeature: OVER_CURRENT\n"); | 198 | "ClearPortFeature: OVER_CURRENT\n"); |
201 | 199 | ||
202 | if (valid_port(wIndex)) { | 200 | if (valid_port(wIndex)) |
203 | info->port[wIndex-1].oc_status = 0; | 201 | info->port[wIndex-1].oc_status = 0; |
204 | } | ||
205 | 202 | ||
206 | goto out; | 203 | goto out; |
207 | 204 | ||
@@ -242,8 +239,11 @@ static int ohci_s3c2410_hub_control ( | |||
242 | desc->wHubCharacteristics |= cpu_to_le16(0x0001); | 239 | desc->wHubCharacteristics |= cpu_to_le16(0x0001); |
243 | 240 | ||
244 | if (info->enable_oc) { | 241 | if (info->enable_oc) { |
245 | desc->wHubCharacteristics &= ~cpu_to_le16(HUB_CHAR_OCPM); | 242 | desc->wHubCharacteristics &= ~cpu_to_le16( |
246 | desc->wHubCharacteristics |= cpu_to_le16(0x0008|0x0001); | 243 | HUB_CHAR_OCPM); |
244 | desc->wHubCharacteristics |= cpu_to_le16( | ||
245 | 0x0008 | | ||
246 | 0x0001); | ||
247 | } | 247 | } |
248 | 248 | ||
249 | dev_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n", | 249 | dev_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n", |
@@ -257,13 +257,11 @@ static int ohci_s3c2410_hub_control ( | |||
257 | dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex); | 257 | dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex); |
258 | 258 | ||
259 | if (valid_port(wIndex)) { | 259 | if (valid_port(wIndex)) { |
260 | if (info->port[wIndex-1].oc_changed) { | 260 | if (info->port[wIndex-1].oc_changed) |
261 | *data |= cpu_to_le32(RH_PS_OCIC); | 261 | *data |= cpu_to_le32(RH_PS_OCIC); |
262 | } | ||
263 | 262 | ||
264 | if (info->port[wIndex-1].oc_status) { | 263 | if (info->port[wIndex-1].oc_status) |
265 | *data |= cpu_to_le32(RH_PS_POCI); | 264 | *data |= cpu_to_le32(RH_PS_POCI); |
266 | } | ||
267 | } | 265 | } |
268 | } | 266 | } |
269 | 267 | ||
@@ -321,7 +319,7 @@ static void s3c2410_hcd_oc(struct s3c2410_hcd_info *info, int port_oc) | |||
321 | */ | 319 | */ |
322 | 320 | ||
323 | static void | 321 | static void |
324 | usb_hcd_s3c2410_remove (struct usb_hcd *hcd, struct platform_device *dev) | 322 | usb_hcd_s3c2410_remove(struct usb_hcd *hcd, struct platform_device *dev) |
325 | { | 323 | { |
326 | usb_remove_hcd(hcd); | 324 | usb_remove_hcd(hcd); |
327 | s3c2410_stop_hc(dev); | 325 | s3c2410_stop_hc(dev); |
@@ -339,7 +337,7 @@ usb_hcd_s3c2410_remove (struct usb_hcd *hcd, struct platform_device *dev) | |||
339 | * through the hotplug entry's driver_data. | 337 | * through the hotplug entry's driver_data. |
340 | * | 338 | * |
341 | */ | 339 | */ |
342 | static int usb_hcd_s3c2410_probe (const struct hc_driver *driver, | 340 | static int usb_hcd_s3c2410_probe(const struct hc_driver *driver, |
343 | struct platform_device *dev) | 341 | struct platform_device *dev) |
344 | { | 342 | { |
345 | struct usb_hcd *hcd = NULL; | 343 | struct usb_hcd *hcd = NULL; |
@@ -411,17 +409,19 @@ static int usb_hcd_s3c2410_probe (const struct hc_driver *driver, | |||
411 | /*-------------------------------------------------------------------------*/ | 409 | /*-------------------------------------------------------------------------*/ |
412 | 410 | ||
413 | static int | 411 | static int |
414 | ohci_s3c2410_start (struct usb_hcd *hcd) | 412 | ohci_s3c2410_start(struct usb_hcd *hcd) |
415 | { | 413 | { |
416 | struct ohci_hcd *ohci = hcd_to_ohci (hcd); | 414 | struct ohci_hcd *ohci = hcd_to_ohci(hcd); |
417 | int ret; | 415 | int ret; |
418 | 416 | ||
419 | if ((ret = ohci_init(ohci)) < 0) | 417 | ret = ohci_init(ohci); |
418 | if (ret < 0) | ||
420 | return ret; | 419 | return ret; |
421 | 420 | ||
422 | if ((ret = ohci_run (ohci)) < 0) { | 421 | ret = ohci_run(ohci); |
423 | err ("can't start %s", hcd->self.bus_name); | 422 | if (ret < 0) { |
424 | ohci_stop (hcd); | 423 | err("can't start %s", hcd->self.bus_name); |
424 | ohci_stop(hcd); | ||
425 | return ret; | 425 | return ret; |
426 | } | 426 | } |
427 | 427 | ||