Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'fixes-for-v3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v3.11-rc3

Here are some fixes for v3.11-rc3. Mostly related to
the recent conversion to configfs done on the gadget
drivers, but we also have a fix for MUSB resources
on platforms which need 3 resources instead of 2, and
a fix for the sysfs_notify() call on udc-core.c which
was notifying an unexistent file.

+26 -16
+10 -4
drivers/usb/gadget/ether.c
··· 449 449 450 450 static int __exit eth_unbind(struct usb_composite_dev *cdev) 451 451 { 452 - if (has_rndis()) 452 + if (has_rndis()) { 453 + usb_put_function(f_rndis); 453 454 usb_put_function_instance(fi_rndis); 454 - if (use_eem) 455 + } 456 + if (use_eem) { 457 + usb_put_function(f_eem); 455 458 usb_put_function_instance(fi_eem); 456 - else if (can_support_ecm(cdev->gadget)) 459 + } else if (can_support_ecm(cdev->gadget)) { 460 + usb_put_function(f_ecm); 457 461 usb_put_function_instance(fi_ecm); 458 - else 462 + } else { 463 + usb_put_function(f_geth); 459 464 usb_put_function_instance(fi_geth); 465 + } 460 466 return 0; 461 467 } 462 468
-2
drivers/usb/gadget/f_phonet.c
··· 488 488 struct usb_ep *ep; 489 489 int status, i; 490 490 491 - #ifndef USBF_PHONET_INCLUDED 492 491 struct f_phonet_opts *phonet_opts; 493 492 494 493 phonet_opts = container_of(f->fi, struct f_phonet_opts, func_inst); ··· 506 507 return status; 507 508 phonet_opts->bound = true; 508 509 } 509 - #endif 510 510 511 511 /* Reserve interface IDs */ 512 512 status = usb_interface_id(c, f);
+3 -7
drivers/usb/gadget/multi.c
··· 160 160 return ret; 161 161 162 162 f_acm_rndis = usb_get_function(fi_acm); 163 - if (IS_ERR(f_acm_rndis)) { 164 - ret = PTR_ERR(f_acm_rndis); 165 - goto err_func_acm; 166 - } 163 + if (IS_ERR(f_acm_rndis)) 164 + return PTR_ERR(f_acm_rndis); 167 165 168 166 ret = usb_add_function(c, f_acm_rndis); 169 167 if (ret) ··· 176 178 usb_remove_function(c, f_acm_rndis); 177 179 err_conf: 178 180 usb_put_function(f_acm_rndis); 179 - err_func_acm: 180 181 return ret; 181 182 } 182 183 ··· 223 226 /* implicit port_num is zero */ 224 227 f_acm_multi = usb_get_function(fi_acm); 225 228 if (IS_ERR(f_acm_multi)) 226 - goto err_func_acm; 229 + return PTR_ERR(f_acm_multi); 227 230 228 231 ret = usb_add_function(c, f_acm_multi); 229 232 if (ret) ··· 238 241 usb_remove_function(c, f_acm_multi); 239 242 err_conf: 240 243 usb_put_function(f_acm_multi); 241 - err_func_acm: 242 244 return ret; 243 245 } 244 246
+1 -1
drivers/usb/gadget/udc-core.c
··· 109 109 enum usb_device_state state) 110 110 { 111 111 gadget->state = state; 112 - sysfs_notify(&gadget->dev.kobj, NULL, "status"); 112 + sysfs_notify(&gadget->dev.kobj, NULL, "state"); 113 113 } 114 114 EXPORT_SYMBOL_GPL(usb_gadget_set_state); 115 115
+6 -1
drivers/usb/musb/omap2430.c
··· 481 481 482 482 static int omap2430_probe(struct platform_device *pdev) 483 483 { 484 - struct resource musb_resources[2]; 484 + struct resource musb_resources[3]; 485 485 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; 486 486 struct omap_musb_board_data *data; 487 487 struct platform_device *musb; ··· 580 580 musb_resources[1].start = pdev->resource[1].start; 581 581 musb_resources[1].end = pdev->resource[1].end; 582 582 musb_resources[1].flags = pdev->resource[1].flags; 583 + 584 + musb_resources[2].name = pdev->resource[2].name; 585 + musb_resources[2].start = pdev->resource[2].start; 586 + musb_resources[2].end = pdev->resource[2].end; 587 + musb_resources[2].flags = pdev->resource[2].flags; 583 588 584 589 ret = platform_device_add_resources(musb, musb_resources, 585 590 ARRAY_SIZE(musb_resources));
+6 -1
drivers/usb/musb/tusb6010.c
··· 1156 1156 1157 1157 static int tusb_probe(struct platform_device *pdev) 1158 1158 { 1159 - struct resource musb_resources[2]; 1159 + struct resource musb_resources[3]; 1160 1160 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; 1161 1161 struct platform_device *musb; 1162 1162 struct tusb6010_glue *glue; ··· 1198 1198 musb_resources[1].start = pdev->resource[1].start; 1199 1199 musb_resources[1].end = pdev->resource[1].end; 1200 1200 musb_resources[1].flags = pdev->resource[1].flags; 1201 + 1202 + musb_resources[2].name = pdev->resource[2].name; 1203 + musb_resources[2].start = pdev->resource[2].start; 1204 + musb_resources[2].end = pdev->resource[2].end; 1205 + musb_resources[2].flags = pdev->resource[2].flags; 1201 1206 1202 1207 ret = platform_device_add_resources(musb, musb_resources, 1203 1208 ARRAY_SIZE(musb_resources));