summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/usb/atm/speedtch.c
diff options
context:
space:
mode:
authorJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-11 10:41:07 +0300
committerJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-13 08:17:18 +0300
commite09b41010ba33a20a87472ee821fa407a5b8da36 (patch)
treed10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/drivers/usb/atm/speedtch.c
parentf93b97fd65072de626c074dbe099a1fff05ce060 (diff)
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. 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 <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/drivers/usb/atm/speedtch.c')
-rw-r--r--kernel/drivers/usb/atm/speedtch.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/kernel/drivers/usb/atm/speedtch.c b/kernel/drivers/usb/atm/speedtch.c
index 0dc8c06a7..0270d1312 100644
--- a/kernel/drivers/usb/atm/speedtch.c
+++ b/kernel/drivers/usb/atm/speedtch.c
@@ -255,7 +255,8 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance,
usb_dbg(usbatm, "%s entered\n", __func__);
- if (!(buffer = (unsigned char *)__get_free_page(GFP_KERNEL))) {
+ buffer = (unsigned char *)__get_free_page(GFP_KERNEL);
+ if (!buffer) {
ret = -ENOMEM;
usb_dbg(usbatm, "%s: no memory for buffer!\n", __func__);
goto out;
@@ -638,7 +639,8 @@ static void speedtch_handle_int(struct urb *int_urb)
goto fail;
}
- if ((int_urb = instance->int_urb)) {
+ int_urb = instance->int_urb;
+ if (int_urb) {
ret = usb_submit_urb(int_urb, GFP_ATOMIC);
schedule_work(&instance->status_check_work);
if (ret < 0) {
@@ -650,7 +652,8 @@ static void speedtch_handle_int(struct urb *int_urb)
return;
fail:
- if ((int_urb = instance->int_urb))
+ int_urb = instance->int_urb;
+ if (int_urb)
mod_timer(&instance->resubmit_timer, jiffies + msecs_to_jiffies(RESUBMIT_DELAY));
}
@@ -759,11 +762,13 @@ static void speedtch_release_interfaces(struct usb_device *usb_dev,
struct usb_interface *cur_intf;
int i;
- for (i = 0; i < num_interfaces; i++)
- if ((cur_intf = usb_ifnum_to_if(usb_dev, i))) {
+ for (i = 0; i < num_interfaces; i++) {
+ cur_intf = usb_ifnum_to_if(usb_dev, i);
+ if (cur_intf) {
usb_set_intfdata(cur_intf, NULL);
usb_driver_release_interface(&speedtch_usb_driver, cur_intf);
}
+ }
}
static int speedtch_bind(struct usbatm_data *usbatm,
@@ -787,7 +792,8 @@ static int speedtch_bind(struct usbatm_data *usbatm,
return -ENODEV;
}
- if (!(data_intf = usb_ifnum_to_if(usb_dev, INTERFACE_DATA))) {
+ data_intf = usb_ifnum_to_if(usb_dev, INTERFACE_DATA);
+ if (!data_intf) {
usb_err(usbatm, "%s: data interface not found!\n", __func__);
return -ENODEV;
}