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

Merge tag 'usb-for-v3.10-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes:

usb: urgent fixes for v3.10 merge window

Here are some late urgent fixes for v3.10 merge window.

All of these errors were introduced by recent commits
which are in linux-next.

f_obex, multi and cdc2 gadget drivers have learned to
return a proper error code when something goes wrong.

usb_bind_phy() was mistakenly placed into .init.text
section which caused Section mismatch warnings and undefined
reference compile errors.

f_source_sink had a copy-paste error which is now corrected.

g_zero got a memory leak plugged.

Two defconfigs got fixed to enable the newly introduced
CONFIG_USB_PHY.

+14 -5
+1
arch/arm/configs/imx_v6_v7_defconfig
··· 188 188 CONFIG_USB_EHCI_MXC=y 189 189 CONFIG_USB_CHIPIDEA=y 190 190 CONFIG_USB_CHIPIDEA_HOST=y 191 + CONFIG_USB_PHY=y 191 192 CONFIG_USB_MXS_PHY=y 192 193 CONFIG_USB_STORAGE=y 193 194 CONFIG_MMC=y
+1
arch/arm/configs/mxs_defconfig
··· 120 120 CONFIG_USB_CHIPIDEA=y 121 121 CONFIG_USB_CHIPIDEA_HOST=y 122 122 CONFIG_USB_STORAGE=y 123 + CONFIG_USB_PHY=y 123 124 CONFIG_USB_MXS_PHY=y 124 125 CONFIG_MMC=y 125 126 CONFIG_MMC_MXS=y
+3 -1
drivers/usb/gadget/cdc2.c
··· 129 129 return PTR_ERR(fi_serial); 130 130 131 131 f_acm = usb_get_function(fi_serial); 132 - if (IS_ERR(f_acm)) 132 + if (IS_ERR(f_acm)) { 133 + status = PTR_ERR(f_acm); 133 134 goto err_func_acm; 135 + } 134 136 135 137 status = usb_add_function(c, f_acm); 136 138 if (status)
+1
drivers/usb/gadget/f_obex.c
··· 348 348 349 349 /* allocate instance-specific endpoints */ 350 350 351 + status = -ENODEV; 351 352 ep = usb_ep_autoconfig(cdev->gadget, &obex_fs_ep_in_desc); 352 353 if (!ep) 353 354 goto fail;
+2 -2
drivers/usb/gadget/f_sourcesink.c
··· 898 898 return &ss->function; 899 899 } 900 900 901 - static void acm_free_instance(struct usb_function_instance *fi) 901 + static void source_sink_free_instance(struct usb_function_instance *fi) 902 902 { 903 903 struct f_ss_opts *ss_opts; 904 904 ··· 913 913 ss_opts = kzalloc(sizeof(*ss_opts), GFP_KERNEL); 914 914 if (!ss_opts) 915 915 return ERR_PTR(-ENOMEM); 916 - ss_opts->func_inst.free_func_inst = acm_free_instance; 916 + ss_opts->func_inst.free_func_inst = source_sink_free_instance; 917 917 return &ss_opts->func_inst; 918 918 } 919 919 DECLARE_USB_FUNCTION(SourceSink, source_sink_alloc_inst,
+3 -1
drivers/usb/gadget/multi.c
··· 157 157 return ret; 158 158 159 159 f_acm_rndis = usb_get_function(fi_acm); 160 - if (IS_ERR(f_acm_rndis)) 160 + if (IS_ERR(f_acm_rndis)) { 161 + ret = PTR_ERR(f_acm_rndis); 161 162 goto err_func_acm; 163 + } 162 164 163 165 ret = usb_add_function(c, f_acm_rndis); 164 166 if (ret)
+2
drivers/usb/gadget/zero.c
··· 368 368 del_timer_sync(&autoresume_timer); 369 369 if (!IS_ERR_OR_NULL(func_ss)) 370 370 usb_put_function(func_ss); 371 + usb_put_function_instance(func_inst_ss); 371 372 if (!IS_ERR_OR_NULL(func_lb)) 372 373 usb_put_function(func_lb); 374 + usb_put_function_instance(func_inst_lb); 373 375 return 0; 374 376 } 375 377
+1 -1
drivers/usb/phy/phy.c
··· 413 413 * 414 414 * To be used by platform specific initialization code. 415 415 */ 416 - int __init usb_bind_phy(const char *dev_name, u8 index, 416 + int usb_bind_phy(const char *dev_name, u8 index, 417 417 const char *phy_dev_name) 418 418 { 419 419 struct usb_phy_bind *phy_bind;