diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-23 12:14:09 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-23 12:14:09 -0400 |
commit | 0b9b6df9ee57d2af7788a0ad95ea6f425a688159 (patch) | |
tree | 9f0409ceae348d97d2745d13b7ae5912b10bcfa2 | |
parent | 4601de807d7755aabd35faf5e15ae233241b8582 (diff) | |
parent | added5fce61e97087a4a25270694c542c5ed1ba9 (diff) |
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.
-rw-r--r-- | arch/arm/configs/imx_v6_v7_defconfig | 1 | ||||
-rw-r--r-- | arch/arm/configs/mxs_defconfig | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/cdc2.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/f_obex.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/f_sourcesink.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/multi.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/zero.c | 2 | ||||
-rw-r--r-- | drivers/usb/phy/phy.c | 2 |
8 files changed, 14 insertions, 5 deletions
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index e36b01025321..088d6c11a0fa 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig | |||
@@ -188,6 +188,7 @@ CONFIG_USB_EHCI_HCD=y | |||
188 | CONFIG_USB_EHCI_MXC=y | 188 | CONFIG_USB_EHCI_MXC=y |
189 | CONFIG_USB_CHIPIDEA=y | 189 | CONFIG_USB_CHIPIDEA=y |
190 | CONFIG_USB_CHIPIDEA_HOST=y | 190 | CONFIG_USB_CHIPIDEA_HOST=y |
191 | CONFIG_USB_PHY=y | ||
191 | CONFIG_USB_MXS_PHY=y | 192 | CONFIG_USB_MXS_PHY=y |
192 | CONFIG_USB_STORAGE=y | 193 | CONFIG_USB_STORAGE=y |
193 | CONFIG_MMC=y | 194 | CONFIG_MMC=y |
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig index 6a99e30f81d2..87924d671115 100644 --- a/arch/arm/configs/mxs_defconfig +++ b/arch/arm/configs/mxs_defconfig | |||
@@ -120,6 +120,7 @@ CONFIG_USB_EHCI_HCD=y | |||
120 | CONFIG_USB_CHIPIDEA=y | 120 | CONFIG_USB_CHIPIDEA=y |
121 | CONFIG_USB_CHIPIDEA_HOST=y | 121 | CONFIG_USB_CHIPIDEA_HOST=y |
122 | CONFIG_USB_STORAGE=y | 122 | CONFIG_USB_STORAGE=y |
123 | CONFIG_USB_PHY=y | ||
123 | CONFIG_USB_MXS_PHY=y | 124 | CONFIG_USB_MXS_PHY=y |
124 | CONFIG_MMC=y | 125 | CONFIG_MMC=y |
125 | CONFIG_MMC_MXS=y | 126 | CONFIG_MMC_MXS=y |
diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c index c6ee6f1558c3..2c5255182769 100644 --- a/drivers/usb/gadget/cdc2.c +++ b/drivers/usb/gadget/cdc2.c | |||
@@ -129,8 +129,10 @@ static int __init cdc_do_config(struct usb_configuration *c) | |||
129 | return PTR_ERR(fi_serial); | 129 | return PTR_ERR(fi_serial); |
130 | 130 | ||
131 | f_acm = usb_get_function(fi_serial); | 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 | goto err_func_acm; | 134 | goto err_func_acm; |
135 | } | ||
134 | 136 | ||
135 | status = usb_add_function(c, f_acm); | 137 | status = usb_add_function(c, f_acm); |
136 | if (status) | 138 | if (status) |
diff --git a/drivers/usb/gadget/f_obex.c b/drivers/usb/gadget/f_obex.c index 29a348a2a294..8aa2be5329bc 100644 --- a/drivers/usb/gadget/f_obex.c +++ b/drivers/usb/gadget/f_obex.c | |||
@@ -348,6 +348,7 @@ static int obex_bind(struct usb_configuration *c, struct usb_function *f) | |||
348 | 348 | ||
349 | /* allocate instance-specific endpoints */ | 349 | /* allocate instance-specific endpoints */ |
350 | 350 | ||
351 | status = -ENODEV; | ||
351 | ep = usb_ep_autoconfig(cdev->gadget, &obex_fs_ep_in_desc); | 352 | ep = usb_ep_autoconfig(cdev->gadget, &obex_fs_ep_in_desc); |
352 | if (!ep) | 353 | if (!ep) |
353 | goto fail; | 354 | goto fail; |
diff --git a/drivers/usb/gadget/f_sourcesink.c b/drivers/usb/gadget/f_sourcesink.c index 41adf3ef96c2..a8895859a221 100644 --- a/drivers/usb/gadget/f_sourcesink.c +++ b/drivers/usb/gadget/f_sourcesink.c | |||
@@ -898,7 +898,7 @@ static struct usb_function *source_sink_alloc_func( | |||
898 | return &ss->function; | 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 | struct f_ss_opts *ss_opts; | 903 | struct f_ss_opts *ss_opts; |
904 | 904 | ||
@@ -913,7 +913,7 @@ static struct usb_function_instance *source_sink_alloc_inst(void) | |||
913 | ss_opts = kzalloc(sizeof(*ss_opts), GFP_KERNEL); | 913 | ss_opts = kzalloc(sizeof(*ss_opts), GFP_KERNEL); |
914 | if (!ss_opts) | 914 | if (!ss_opts) |
915 | return ERR_PTR(-ENOMEM); | 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 | return &ss_opts->func_inst; | 917 | return &ss_opts->func_inst; |
918 | } | 918 | } |
919 | DECLARE_USB_FUNCTION(SourceSink, source_sink_alloc_inst, | 919 | DECLARE_USB_FUNCTION(SourceSink, source_sink_alloc_inst, |
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index a74ebefc7682..4a45e80c6e38 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c | |||
@@ -157,8 +157,10 @@ static __init int rndis_do_config(struct usb_configuration *c) | |||
157 | return ret; | 157 | return ret; |
158 | 158 | ||
159 | f_acm_rndis = usb_get_function(fi_acm); | 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 | goto err_func_acm; | 162 | goto err_func_acm; |
163 | } | ||
162 | 164 | ||
163 | ret = usb_add_function(c, f_acm_rndis); | 165 | ret = usb_add_function(c, f_acm_rndis); |
164 | if (ret) | 166 | if (ret) |
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index 685fa681cb65..2cd6262e8b71 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c | |||
@@ -368,8 +368,10 @@ static int zero_unbind(struct usb_composite_dev *cdev) | |||
368 | del_timer_sync(&autoresume_timer); | 368 | del_timer_sync(&autoresume_timer); |
369 | if (!IS_ERR_OR_NULL(func_ss)) | 369 | if (!IS_ERR_OR_NULL(func_ss)) |
370 | usb_put_function(func_ss); | 370 | usb_put_function(func_ss); |
371 | usb_put_function_instance(func_inst_ss); | ||
371 | if (!IS_ERR_OR_NULL(func_lb)) | 372 | if (!IS_ERR_OR_NULL(func_lb)) |
372 | usb_put_function(func_lb); | 373 | usb_put_function(func_lb); |
374 | usb_put_function_instance(func_inst_lb); | ||
373 | return 0; | 375 | return 0; |
374 | } | 376 | } |
375 | 377 | ||
diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index f52c006417ff..a9984c700d2c 100644 --- a/drivers/usb/phy/phy.c +++ b/drivers/usb/phy/phy.c | |||
@@ -413,7 +413,7 @@ EXPORT_SYMBOL_GPL(usb_remove_phy); | |||
413 | * | 413 | * |
414 | * To be used by platform specific initialization code. | 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 | const char *phy_dev_name) | 417 | const char *phy_dev_name) |
418 | { | 418 | { |
419 | struct usb_phy_bind *phy_bind; | 419 | struct usb_phy_bind *phy_bind; |