aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorRahul Bedarkar <rahulbedarkar89@gmail.com>2014-01-04 03:43:10 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-07 19:19:31 -0500
commita7737e3444b573512e47b64251e0822fff2e6614 (patch)
tree2b5d932d4d05dafc601f91e8fd3d6012d177cfd0 /drivers/usb
parent486513179931649977edf24dfbde7d82e3d904b2 (diff)
USB: wusbcore: fix up coding style issues in wusbhc.c and wusbhc.h
Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/wusbcore/wusbhc.c15
-rw-r--r--drivers/usb/wusbcore/wusbhc.h7
2 files changed, 14 insertions, 8 deletions
diff --git a/drivers/usb/wusbcore/wusbhc.c b/drivers/usb/wusbcore/wusbhc.c
index 4dd943a17fd4..3e1ba51d1a43 100644
--- a/drivers/usb/wusbcore/wusbhc.c
+++ b/drivers/usb/wusbcore/wusbhc.c
@@ -55,7 +55,8 @@ static struct wusbhc *usbhc_dev_to_wusbhc(struct device *dev)
55 * value of trust_timeout is jiffies. 55 * value of trust_timeout is jiffies.
56 */ 56 */
57static ssize_t wusb_trust_timeout_show(struct device *dev, 57static ssize_t wusb_trust_timeout_show(struct device *dev,
58 struct device_attribute *attr, char *buf) 58 struct device_attribute *attr,
59 char *buf)
59{ 60{
60 struct wusbhc *wusbhc = usbhc_dev_to_wusbhc(dev); 61 struct wusbhc *wusbhc = usbhc_dev_to_wusbhc(dev);
61 62
@@ -173,7 +174,8 @@ static ssize_t wusb_phy_rate_store(struct device *dev,
173 wusbhc->phy_rate = phy_rate; 174 wusbhc->phy_rate = phy_rate;
174 return size; 175 return size;
175} 176}
176static DEVICE_ATTR(wusb_phy_rate, 0644, wusb_phy_rate_show, wusb_phy_rate_store); 177static DEVICE_ATTR(wusb_phy_rate, 0644, wusb_phy_rate_show,
178 wusb_phy_rate_store);
177 179
178static ssize_t wusb_dnts_show(struct device *dev, 180static ssize_t wusb_dnts_show(struct device *dev,
179 struct device_attribute *attr, 181 struct device_attribute *attr,
@@ -227,7 +229,8 @@ static ssize_t wusb_retry_count_store(struct device *dev,
227 if (result != 1) 229 if (result != 1)
228 return -EINVAL; 230 return -EINVAL;
229 231
230 wusbhc->retry_count = max_t(uint8_t, retry_count, WUSB_RETRY_COUNT_MAX); 232 wusbhc->retry_count = max_t(uint8_t, retry_count,
233 WUSB_RETRY_COUNT_MAX);
231 234
232 return size; 235 return size;
233} 236}
@@ -321,7 +324,8 @@ int wusbhc_b_create(struct wusbhc *wusbhc)
321 324
322 result = sysfs_create_group(wusbhc_kobj(wusbhc), &wusbhc_attr_group); 325 result = sysfs_create_group(wusbhc_kobj(wusbhc), &wusbhc_attr_group);
323 if (result < 0) { 326 if (result < 0) {
324 dev_err(dev, "Cannot register WUSBHC attributes: %d\n", result); 327 dev_err(dev, "Cannot register WUSBHC attributes: %d\n",
328 result);
325 goto error_create_attr_group; 329 goto error_create_attr_group;
326 } 330 }
327 331
@@ -425,7 +429,8 @@ EXPORT_SYMBOL_GPL(wusb_cluster_id_put);
425 */ 429 */
426void wusbhc_giveback_urb(struct wusbhc *wusbhc, struct urb *urb, int status) 430void wusbhc_giveback_urb(struct wusbhc *wusbhc, struct urb *urb, int status)
427{ 431{
428 struct wusb_dev *wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc, urb->dev); 432 struct wusb_dev *wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc,
433 urb->dev);
429 434
430 if (status == 0 && wusb_dev) { 435 if (status == 0 && wusb_dev) {
431 wusb_dev->entry_ts = jiffies; 436 wusb_dev->entry_ts = jiffies;
diff --git a/drivers/usb/wusbcore/wusbhc.h b/drivers/usb/wusbcore/wusbhc.h
index 6bd3b819a6b5..2384add45371 100644
--- a/drivers/usb/wusbcore/wusbhc.h
+++ b/drivers/usb/wusbcore/wusbhc.h
@@ -164,7 +164,7 @@ struct wusb_port {
164 * functions/operations that only deal with general Wireless USB HC 164 * functions/operations that only deal with general Wireless USB HC
165 * issues use this data type to refer to the host. 165 * issues use this data type to refer to the host.
166 * 166 *
167 * @usb_hcd Instantiation of a USB host controller 167 * @usb_hcd Instantiation of a USB host controller
168 * (initialized by upper layer [HWA=HC or WHCI]. 168 * (initialized by upper layer [HWA=HC or WHCI].
169 * 169 *
170 * @dev Device that implements this; initialized by the 170 * @dev Device that implements this; initialized by the
@@ -196,7 +196,7 @@ struct wusb_port {
196 * @ports_max Number of simultaneous device connections (fake 196 * @ports_max Number of simultaneous device connections (fake
197 * ports) this HC will take. Read-only. 197 * ports) this HC will take. Read-only.
198 * 198 *
199 * @port Array of port status for each fake root port. Guaranteed to 199 * @port Array of port status for each fake root port. Guaranteed to
200 * always be the same length during device existence 200 * always be the same length during device existence
201 * [this allows for some unlocked but referenced reading]. 201 * [this allows for some unlocked but referenced reading].
202 * 202 *
@@ -329,7 +329,8 @@ void wusbhc_pal_unregister(struct wusbhc *wusbhc);
329 * This is a safe assumption as @usb_dev->bus is referenced all the 329 * This is a safe assumption as @usb_dev->bus is referenced all the
330 * time during the @usb_dev life cycle. 330 * time during the @usb_dev life cycle.
331 */ 331 */
332static inline struct usb_hcd *usb_hcd_get_by_usb_dev(struct usb_device *usb_dev) 332static inline
333struct usb_hcd *usb_hcd_get_by_usb_dev(struct usb_device *usb_dev)
333{ 334{
334 struct usb_hcd *usb_hcd; 335 struct usb_hcd *usb_hcd;
335 usb_hcd = container_of(usb_dev->bus, struct usb_hcd, self); 336 usb_hcd = container_of(usb_dev->bus, struct usb_hcd, self);