From patchwork Tue Apr 4 06:18:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 96694 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp48406qgd; Mon, 3 Apr 2017 23:18:49 -0700 (PDT) X-Received: by 10.98.204.25 with SMTP id a25mr21178674pfg.6.1491286729632; Mon, 03 Apr 2017 23:18:49 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9si746909pgf.57.2017.04.03.23.18.49; Mon, 03 Apr 2017 23:18:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752498AbdDDGSt (ORCPT + 6 others); Tue, 4 Apr 2017 02:18:49 -0400 Received: from mail-pg0-f53.google.com ([74.125.83.53]:36270 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751092AbdDDGSs (ORCPT ); Tue, 4 Apr 2017 02:18:48 -0400 Received: by mail-pg0-f53.google.com with SMTP id g2so140824193pge.3 for ; Mon, 03 Apr 2017 23:18:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pL8UdHid6fe21wcMh+Y6hAW8vWBXpxHPy2fOfxMRqwQ=; b=fGCMUjCgrbjM/n2kOUFp59BZQZY+S027Lai6cmh9V5IHAhUaGdXTO1TpcIc1Rjddbn jzlx449Bo5IPLYAj3tv5s4KrV0rAYSdkWXdc+wsYmJXgFnWjQejrFhMGsOgdvUCen+uS Dqhsj81gTtKVIsK4FP2Waxy/dcbOCtdKVZHoA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pL8UdHid6fe21wcMh+Y6hAW8vWBXpxHPy2fOfxMRqwQ=; b=LEDYKcAuWq58gNwFVheDKGfhzoSfRDxsGk5evaWFxht60xMhHIQ6qNfc5QE7YQnEhj e8Mw57fcxtFCRfyuGsZIBhpcR6vh7hX/xXuFLC0zbgTCyrralmSR8MhyaoCdNAJOKvFo WWc9UBtMmzFlChPDc4ieQuYEvQf2gkniQF+W2CbstQNf7PoliCpgIAam3Sm66b6zDh0G 4X2GbslBEHdYJfvQ+re9gl4WHDi/8tPzR+DYhtohmbJfNnoK+H7dEOuXAiJq+NvU9fF1 yL7KBwg/UAFxBD7YyjXuD8QlN7mfl1/tKbV14vtbQA+5Sdgt/epxPhujehLWFNRTW2tq SiOg== X-Gm-Message-State: AFeK/H2NC4scsGNs7TxczN++EFEmBBkJaK54GsbBwqlVGl3nBJ9S2bEyS5kFioSNa73qzOSR X-Received: by 10.98.138.206 with SMTP id o75mr341615pfk.128.1491286727709; Mon, 03 Apr 2017 23:18:47 -0700 (PDT) Received: from localhost.localdomain ([106.51.240.246]) by smtp.gmail.com with ESMTPSA id y70sm29190878pfa.96.2017.04.03.23.18.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Apr 2017 23:18:47 -0700 (PDT) From: Amit Pundir To: gregkh@linuxfoundation.org Cc: stable@vger.kernel.org, Vishal Thanki , Kalle Valo Subject: [PATCH 32/33] rt2x00: Fix incorrect usage of CONFIG_RT2X00_LIB_USB Date: Tue, 4 Apr 2017 11:48:38 +0530 Message-Id: <1491286719-31388-3-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491286719-31388-1-git-send-email-amit.pundir@linaro.org> References: <1491286719-31388-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Vishal Thanki In device removal routine, usage of "#ifdef CONFIG_RT2X00_LIB_USB" will not cover the case when it is configured as module. This will omit the entire if-block which does cleanup of URBs and cancellation of pending work. Changing the #ifdef to #if IS_ENABLED() to fix it. Signed-off-by: Vishal Thanki Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo (cherry picked from commit a083c8fd277b4122c804f18ec8c84165f345c71c) Signed-off-by: Amit Pundir --- drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c index 4e0c565..b7273be 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c @@ -1422,7 +1422,7 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev) cancel_work_sync(&rt2x00dev->intf_work); cancel_delayed_work_sync(&rt2x00dev->autowakeup_work); cancel_work_sync(&rt2x00dev->sleep_work); -#ifdef CONFIG_RT2X00_LIB_USB +#if IS_ENABLED(CONFIG_RT2X00_LIB_USB) if (rt2x00_is_usb(rt2x00dev)) { usb_kill_anchored_urbs(rt2x00dev->anchor); hrtimer_cancel(&rt2x00dev->txstatus_timer);