aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/ether.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-05 18:18:00 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-05 18:18:00 -0400
commit64dc9e2e7320f079b97c46b106133b58b8e18d40 (patch)
treeab010dc1337d44e29c2b32b7f11788620a91fe4f /drivers/usb/gadget/ether.c
parent01a60e76b6392547ad3dca3ac05b9c886fa5da45 (diff)
parent9b192de60b5a584ee4ed967fb6758773c75e4643 (diff)
Merge tag 'usb-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes: usb: patches for v3.10 merge window Here is the big Gadget & PHY pull request. Many of us have been really busy lately getting multiple drivers to a better position. Since this pull request is so large, I will divide it in sections so it's easier to grasp what's included. - cleanups: . UDC drivers no longer touch gadget->dev, that's now udc-core responsibility . Many more UDC drivers converted to usb_gadget_map/unmap_request() . UDC drivers no longer initialize DMA-related fields from gadget's device structure . UDC drivers don't touch gadget.dev.driver directly . UDC drivers don't assign gadget.dev.release directly . Removal of some unused DMA_ADDR_INVALID . Introduction of CONFIG_USB_PHY . All phy drivers have been moved to drivers/usb/phy and renamed to a common naming scheme . Fix PHY layer so it never returns a NULL pointer, also fix all callers to avoid using IS_ERR_OR_NULL() . Sparse fixes all over the place . drivers/usb/otg/ has been deleted . Marvel drivers (mv_udc, ehci-mv, mv_otg and mv_u3d) improved clock usage - new features: . UDC core now provides a generic way for tracking and reporting UDC's state (not attached, resuming, suspended, addressed, default, etc) . twl4030-usb learned that it shouldn't be enabled during init . Full DT support for DWC3 has been implemented . ab8500-usb learned about pinctrl framework . nop PHY learned about DeviceTree and regulators . DWC3 learned about suspend/resume . DWC3 can now be compiled in host-only and gadget-only (as well as DRD) configurations . UVC now enables streaming endpoint based on negotiated speed . isp1301 now implements the PHY API properly . configfs-based interface for gadget drivers which will lead to the removal of all code which just combines functions together to build functional gadget drivers. . f_serial and f_obex were converted to new configfs interface while maintaining old interface around. - non-critical fixes: . UVC gadget driver got fixes for Endpoint usage and stream calculation . ab8500-usb fixed unbalanced clock and regulator API usage . twl4030-usb got a fix for when OMAP3 is booted with cable connected . fusb300_udc got a fix for DMA usage . UVC got fixes for two assertions of the USB Video Class Compliance specification revision 1.1 . build warning issues caused by recent addition of __must_check to regulator API These are all changes which deserve a mention, all other changes are related to these one or minor spelling fixes and other similar tasks. Signed-of-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/ether.c')
-rw-r--r--drivers/usb/gadget/ether.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 18c3f423706e..56c8ecae9bc3 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -207,7 +207,7 @@ static struct usb_gadget_strings *dev_strings[] = {
207}; 207};
208 208
209static u8 hostaddr[ETH_ALEN]; 209static u8 hostaddr[ETH_ALEN];
210 210static struct eth_dev *the_dev;
211/*-------------------------------------------------------------------------*/ 211/*-------------------------------------------------------------------------*/
212 212
213/* 213/*
@@ -224,7 +224,7 @@ static int __init rndis_do_config(struct usb_configuration *c)
224 c->bmAttributes |= USB_CONFIG_ATT_WAKEUP; 224 c->bmAttributes |= USB_CONFIG_ATT_WAKEUP;
225 } 225 }
226 226
227 return rndis_bind_config(c, hostaddr); 227 return rndis_bind_config(c, hostaddr, the_dev);
228} 228}
229 229
230static struct usb_configuration rndis_config_driver = { 230static struct usb_configuration rndis_config_driver = {
@@ -257,11 +257,11 @@ static int __init eth_do_config(struct usb_configuration *c)
257 } 257 }
258 258
259 if (use_eem) 259 if (use_eem)
260 return eem_bind_config(c); 260 return eem_bind_config(c, the_dev);
261 else if (can_support_ecm(c->cdev->gadget)) 261 else if (can_support_ecm(c->cdev->gadget))
262 return ecm_bind_config(c, hostaddr); 262 return ecm_bind_config(c, hostaddr, the_dev);
263 else 263 else
264 return geth_bind_config(c, hostaddr); 264 return geth_bind_config(c, hostaddr, the_dev);
265} 265}
266 266
267static struct usb_configuration eth_config_driver = { 267static struct usb_configuration eth_config_driver = {
@@ -279,9 +279,9 @@ static int __init eth_bind(struct usb_composite_dev *cdev)
279 int status; 279 int status;
280 280
281 /* set up network link layer */ 281 /* set up network link layer */
282 status = gether_setup(cdev->gadget, hostaddr); 282 the_dev = gether_setup(cdev->gadget, hostaddr);
283 if (status < 0) 283 if (IS_ERR(the_dev))
284 return status; 284 return PTR_ERR(the_dev);
285 285
286 /* set up main config label and device descriptor */ 286 /* set up main config label and device descriptor */
287 if (use_eem) { 287 if (use_eem) {
@@ -338,13 +338,13 @@ static int __init eth_bind(struct usb_composite_dev *cdev)
338 return 0; 338 return 0;
339 339
340fail: 340fail:
341 gether_cleanup(); 341 gether_cleanup(the_dev);
342 return status; 342 return status;
343} 343}
344 344
345static int __exit eth_unbind(struct usb_composite_dev *cdev) 345static int __exit eth_unbind(struct usb_composite_dev *cdev)
346{ 346{
347 gether_cleanup(); 347 gether_cleanup(the_dev);
348 return 0; 348 return 0;
349} 349}
350 350