Commit 235d57ed authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'fixes-for-v3.11-rc3' of...

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.
parents 683a0e4d 1894870e
...@@ -449,14 +449,20 @@ static int __init eth_bind(struct usb_composite_dev *cdev) ...@@ -449,14 +449,20 @@ static int __init eth_bind(struct usb_composite_dev *cdev)
static int __exit eth_unbind(struct usb_composite_dev *cdev) static int __exit eth_unbind(struct usb_composite_dev *cdev)
{ {
if (has_rndis()) if (has_rndis()) {
usb_put_function(f_rndis);
usb_put_function_instance(fi_rndis); usb_put_function_instance(fi_rndis);
if (use_eem) }
if (use_eem) {
usb_put_function(f_eem);
usb_put_function_instance(fi_eem); usb_put_function_instance(fi_eem);
else if (can_support_ecm(cdev->gadget)) } else if (can_support_ecm(cdev->gadget)) {
usb_put_function(f_ecm);
usb_put_function_instance(fi_ecm); usb_put_function_instance(fi_ecm);
else } else {
usb_put_function(f_geth);
usb_put_function_instance(fi_geth); usb_put_function_instance(fi_geth);
}
return 0; return 0;
} }
......
...@@ -488,7 +488,6 @@ static int pn_bind(struct usb_configuration *c, struct usb_function *f) ...@@ -488,7 +488,6 @@ static int pn_bind(struct usb_configuration *c, struct usb_function *f)
struct usb_ep *ep; struct usb_ep *ep;
int status, i; int status, i;
#ifndef USBF_PHONET_INCLUDED
struct f_phonet_opts *phonet_opts; struct f_phonet_opts *phonet_opts;
phonet_opts = container_of(f->fi, struct f_phonet_opts, func_inst); phonet_opts = container_of(f->fi, struct f_phonet_opts, func_inst);
...@@ -507,7 +506,6 @@ static int pn_bind(struct usb_configuration *c, struct usb_function *f) ...@@ -507,7 +506,6 @@ static int pn_bind(struct usb_configuration *c, struct usb_function *f)
return status; return status;
phonet_opts->bound = true; phonet_opts->bound = true;
} }
#endif
/* Reserve interface IDs */ /* Reserve interface IDs */
status = usb_interface_id(c, f); status = usb_interface_id(c, f);
......
...@@ -160,10 +160,8 @@ static __init int rndis_do_config(struct usb_configuration *c) ...@@ -160,10 +160,8 @@ static __init int rndis_do_config(struct usb_configuration *c)
return ret; return ret;
f_acm_rndis = usb_get_function(fi_acm); f_acm_rndis = usb_get_function(fi_acm);
if (IS_ERR(f_acm_rndis)) { if (IS_ERR(f_acm_rndis))
ret = PTR_ERR(f_acm_rndis); return PTR_ERR(f_acm_rndis);
goto err_func_acm;
}
ret = usb_add_function(c, f_acm_rndis); ret = usb_add_function(c, f_acm_rndis);
if (ret) if (ret)
...@@ -178,7 +176,6 @@ static __init int rndis_do_config(struct usb_configuration *c) ...@@ -178,7 +176,6 @@ static __init int rndis_do_config(struct usb_configuration *c)
usb_remove_function(c, f_acm_rndis); usb_remove_function(c, f_acm_rndis);
err_conf: err_conf:
usb_put_function(f_acm_rndis); usb_put_function(f_acm_rndis);
err_func_acm:
return ret; return ret;
} }
...@@ -226,7 +223,7 @@ static __init int cdc_do_config(struct usb_configuration *c) ...@@ -226,7 +223,7 @@ static __init int cdc_do_config(struct usb_configuration *c)
/* implicit port_num is zero */ /* implicit port_num is zero */
f_acm_multi = usb_get_function(fi_acm); f_acm_multi = usb_get_function(fi_acm);
if (IS_ERR(f_acm_multi)) if (IS_ERR(f_acm_multi))
goto err_func_acm; return PTR_ERR(f_acm_multi);
ret = usb_add_function(c, f_acm_multi); ret = usb_add_function(c, f_acm_multi);
if (ret) if (ret)
...@@ -241,7 +238,6 @@ static __init int cdc_do_config(struct usb_configuration *c) ...@@ -241,7 +238,6 @@ static __init int cdc_do_config(struct usb_configuration *c)
usb_remove_function(c, f_acm_multi); usb_remove_function(c, f_acm_multi);
err_conf: err_conf:
usb_put_function(f_acm_multi); usb_put_function(f_acm_multi);
err_func_acm:
return ret; return ret;
} }
......
...@@ -109,7 +109,7 @@ void usb_gadget_set_state(struct usb_gadget *gadget, ...@@ -109,7 +109,7 @@ void usb_gadget_set_state(struct usb_gadget *gadget,
enum usb_device_state state) enum usb_device_state state)
{ {
gadget->state = state; gadget->state = state;
sysfs_notify(&gadget->dev.kobj, NULL, "status"); sysfs_notify(&gadget->dev.kobj, NULL, "state");
} }
EXPORT_SYMBOL_GPL(usb_gadget_set_state); EXPORT_SYMBOL_GPL(usb_gadget_set_state);
......
...@@ -481,7 +481,7 @@ static u64 omap2430_dmamask = DMA_BIT_MASK(32); ...@@ -481,7 +481,7 @@ static u64 omap2430_dmamask = DMA_BIT_MASK(32);
static int omap2430_probe(struct platform_device *pdev) static int omap2430_probe(struct platform_device *pdev)
{ {
struct resource musb_resources[2]; struct resource musb_resources[3];
struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data;
struct omap_musb_board_data *data; struct omap_musb_board_data *data;
struct platform_device *musb; struct platform_device *musb;
...@@ -581,6 +581,11 @@ static int omap2430_probe(struct platform_device *pdev) ...@@ -581,6 +581,11 @@ static int omap2430_probe(struct platform_device *pdev)
musb_resources[1].end = pdev->resource[1].end; musb_resources[1].end = pdev->resource[1].end;
musb_resources[1].flags = pdev->resource[1].flags; musb_resources[1].flags = pdev->resource[1].flags;
musb_resources[2].name = pdev->resource[2].name;
musb_resources[2].start = pdev->resource[2].start;
musb_resources[2].end = pdev->resource[2].end;
musb_resources[2].flags = pdev->resource[2].flags;
ret = platform_device_add_resources(musb, musb_resources, ret = platform_device_add_resources(musb, musb_resources,
ARRAY_SIZE(musb_resources)); ARRAY_SIZE(musb_resources));
if (ret) { if (ret) {
......
...@@ -1156,7 +1156,7 @@ static u64 tusb_dmamask = DMA_BIT_MASK(32); ...@@ -1156,7 +1156,7 @@ static u64 tusb_dmamask = DMA_BIT_MASK(32);
static int tusb_probe(struct platform_device *pdev) static int tusb_probe(struct platform_device *pdev)
{ {
struct resource musb_resources[2]; struct resource musb_resources[3];
struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data;
struct platform_device *musb; struct platform_device *musb;
struct tusb6010_glue *glue; struct tusb6010_glue *glue;
...@@ -1199,6 +1199,11 @@ static int tusb_probe(struct platform_device *pdev) ...@@ -1199,6 +1199,11 @@ static int tusb_probe(struct platform_device *pdev)
musb_resources[1].end = pdev->resource[1].end; musb_resources[1].end = pdev->resource[1].end;
musb_resources[1].flags = pdev->resource[1].flags; musb_resources[1].flags = pdev->resource[1].flags;
musb_resources[2].name = pdev->resource[2].name;
musb_resources[2].start = pdev->resource[2].start;
musb_resources[2].end = pdev->resource[2].end;
musb_resources[2].flags = pdev->resource[2].flags;
ret = platform_device_add_resources(musb, musb_resources, ret = platform_device_add_resources(musb, musb_resources,
ARRAY_SIZE(musb_resources)); ARRAY_SIZE(musb_resources));
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment