From: Greg Kroah-Hartman Date: Mon, 8 Jun 2015 17:57:51 +0000 (-0700) Subject: Merge 4.1-rc7 into usb-next X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=19915e623458;p=linux-beck.git Merge 4.1-rc7 into usb-next This resolves a merge issue in musb_core.c and we want the fixes that were in Linus's tree in this branch as well for testing. Signed-off-by: Greg Kroah-Hartman --- 19915e623458004547c1c2490b09bb923fe69337 diff --cc drivers/usb/gadget/function/f_fs.c index e455eeee6444,3507f880eb74..45b8c8b338df --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@@ -3444,16 -3445,12 +3446,17 @@@ static void ffs_closed(struct ffs_data ffs_obj->desc_ready = false; - if (ffs_obj->ffs_closed_callback) + if (test_and_clear_bit(FFS_FL_CALL_CLOSED_CALLBACK, &ffs->flags) && + ffs_obj->ffs_closed_callback) ffs_obj->ffs_closed_callback(ffs); - if (!ffs_obj->opts || ffs_obj->opts->no_configfs - || !ffs_obj->opts->func_inst.group.cg_item.ci_parent) + if (ffs_obj->opts) + opts = ffs_obj->opts; + else + goto done; + + if (opts->no_configfs || !opts->func_inst.group.cg_item.ci_parent + || !atomic_read(&opts->func_inst.group.cg_item.ci_kref.refcount)) goto done; unregister_gadget_item(ffs_obj->opts-> diff --cc drivers/usb/musb/musb_core.c index d878aee404bf,6dca3d794ced..514a6cdaeff6 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@@ -2040,12 -2029,13 +2040,18 @@@ musb_init_controller(struct device *dev musb->io.ep_offset = musb_flat_ep_offset; musb->io.ep_select = musb_flat_ep_select; } + /* And override them with platform specific ops if specified. */ + if (musb->ops->ep_offset) + musb->io.ep_offset = musb->ops->ep_offset; + if (musb->ops->ep_select) + musb->io.ep_select = musb->ops->ep_select; + /* At least tusb6010 has its own offsets */ + if (musb->ops->ep_offset) + musb->io.ep_offset = musb->ops->ep_offset; + if (musb->ops->ep_select) + musb->io.ep_select = musb->ops->ep_select; + if (musb->ops->fifo_mode) fifo_mode = musb->ops->fifo_mode; else