From e09b41010ba33a20a87472ee821fa407a5b8da36 Mon Sep 17 00:00:00 2001 From: José Pekkarinen Date: Mon, 11 Apr 2016 10:41:07 +0300 Subject: These changes are the raw update to linux-4.4.6-rt14. Kernel sources are taken from kernel.org, and rt patch from the rt wiki download page. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen --- kernel/drivers/usb/gadget/function/f_phonet.c | 33 ++++----------------------- 1 file changed, 5 insertions(+), 28 deletions(-) (limited to 'kernel/drivers/usb/gadget/function/f_phonet.c') diff --git a/kernel/drivers/usb/gadget/function/f_phonet.c b/kernel/drivers/usb/gadget/function/f_phonet.c index c0c3ef272..157441dbf 100644 --- a/kernel/drivers/usb/gadget/function/f_phonet.c +++ b/kernel/drivers/usb/gadget/function/f_phonet.c @@ -418,7 +418,7 @@ static int pn_set_alt(struct usb_function *f, unsigned intf, unsigned alt) spin_lock(&port->lock); - if (fp->in_ep->driver_data) + if (fp->in_ep->enabled) __pn_reset(f); if (alt == 1) { @@ -530,13 +530,11 @@ static int pn_bind(struct usb_configuration *c, struct usb_function *f) if (!ep) goto err; fp->out_ep = ep; - ep->driver_data = fp; /* Claim */ ep = usb_ep_autoconfig(gadget, &pn_fs_source_desc); if (!ep) goto err; fp->in_ep = ep; - ep->driver_data = fp; /* Claim */ pn_hs_sink_desc.bEndpointAddress = pn_fs_sink_desc.bEndpointAddress; pn_hs_source_desc.bEndpointAddress = pn_fs_source_desc.bEndpointAddress; @@ -575,10 +573,6 @@ err_req: usb_ep_free_request(fp->out_ep, fp->out_reqv[i]); usb_free_all_descriptors(f); err: - if (fp->out_ep) - fp->out_ep->driver_data = NULL; - if (fp->in_ep) - fp->in_ep->driver_data = NULL; ERROR(cdev, "USB CDC Phonet: cannot autoconfigure\n"); return status; } @@ -589,21 +583,6 @@ static inline struct f_phonet_opts *to_f_phonet_opts(struct config_item *item) func_inst.group); } -CONFIGFS_ATTR_STRUCT(f_phonet_opts); -static ssize_t f_phonet_attr_show(struct config_item *item, - struct configfs_attribute *attr, - char *page) -{ - struct f_phonet_opts *opts = to_f_phonet_opts(item); - struct f_phonet_opts_attribute *f_phonet_opts_attr = - container_of(attr, struct f_phonet_opts_attribute, attr); - ssize_t ret = 0; - - if (f_phonet_opts_attr->show) - ret = f_phonet_opts_attr->show(opts, page); - return ret; -} - static void phonet_attr_release(struct config_item *item) { struct f_phonet_opts *opts = to_f_phonet_opts(item); @@ -613,19 +592,17 @@ static void phonet_attr_release(struct config_item *item) static struct configfs_item_operations phonet_item_ops = { .release = phonet_attr_release, - .show_attribute = f_phonet_attr_show, }; -static ssize_t f_phonet_ifname_show(struct f_phonet_opts *opts, char *page) +static ssize_t f_phonet_ifname_show(struct config_item *item, char *page) { - return gether_get_ifname(opts->net, page, PAGE_SIZE); + return gether_get_ifname(to_f_phonet_opts(item)->net, page, PAGE_SIZE); } -static struct f_phonet_opts_attribute f_phonet_ifname = - __CONFIGFS_ATTR_RO(ifname, f_phonet_ifname_show); +CONFIGFS_ATTR_RO(f_phonet_, ifname); static struct configfs_attribute *phonet_attrs[] = { - &f_phonet_ifname.attr, + &f_phonet_attr_ifname, NULL, }; -- cgit 1.2.3-korg