diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2014-11-08 00:43:33 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-27 00:45:12 +0300 |
commit | 2e6ac45c4af7dfc2225985bdc5ec0514f6d8d29b (patch) | |
tree | 2305c533ace9aaddc55d02d9a5149f2063f82a23 /drivers/staging/octeon-usb | |
parent | 030739f52e0ac1a5c12b04d0ee414f612a9c8729 (diff) | |
download | linux-2e6ac45c4af7dfc2225985bdc5ec0514f6d8d29b.tar.xz |
staging: octeon-usb: move helper functions
Move helper functions to make them visible to all functions.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon-usb')
-rw-r--r-- | drivers/staging/octeon-usb/octeon-hcd.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index 4337a2fe282e..57ae66b8fd7b 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -456,6 +456,16 @@ struct octeon_temp_buffer { u8 data[0]; }; +static inline struct octeon_hcd *cvmx_usb_to_octeon(struct cvmx_usb_state *p) +{ + return container_of(p, struct octeon_hcd, usb); +} + +static inline struct usb_hcd *octeon_to_hcd(struct octeon_hcd *p) +{ + return container_of((void *)p, struct usb_hcd, hcd_priv); +} + /** * octeon_alloc_temp_buffer - allocate a temporary buffer for USB transfer * (if needed) @@ -2112,16 +2122,6 @@ done: union cvmx_usbcx_gintmsk, sofmsk, need_sof); } -static inline struct octeon_hcd *cvmx_usb_to_octeon(struct cvmx_usb_state *p) -{ - return container_of(p, struct octeon_hcd, usb); -} - -static inline struct usb_hcd *octeon_to_hcd(struct octeon_hcd *p) -{ - return container_of((void *)p, struct usb_hcd, hcd_priv); -} - static void octeon_usb_urb_complete_callback(struct cvmx_usb_state *usb, enum cvmx_usb_complete status, struct cvmx_usb_pipe *pipe, |