From patchwork Fri Mar 20 03:34:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 46126 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 84F5021515 for ; Fri, 20 Mar 2015 03:35:06 +0000 (UTC) Received: by wivr20 with SMTP id r20sf1156188wiv.0 for ; Thu, 19 Mar 2015 20:35:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=MQRNmce9lax+g9/HcJLD2kW3sKrS5kyJjV3ONh5bxm8=; b=PPcVXUaXNNlDNe5bsjHaNP1/Nhx5zh3xYNpNLTNgIOM+dfVMqmolUO+fACTyS0Ju52 As9UoT0bWTml+H0PgIibguA3CKU5EBJNTr0STI2Eq2NfLKImPc8raew4wMi23KWowT4b /mHoSRiCt7CukUIjK1/q1RLfcEZUz3u5AhF96EmSf13/NFoV1GIXAFOF6sxIdzm8HhMM V4XhUeZ1IwMY+Ahzsujpodq5ruasYYtsySchxDFHK0DIFMNm5oRt87JIQqquzdJSvRpj OVRBBpq0PmqHELe3o1OHkVIDXG7jVPgnw1rqxsbVqI/SwtWdzp/qc6nkw42EsERe/0nD 7JSA== X-Gm-Message-State: ALoCoQkiC9KOharncg6L2JYrOtmUz+pmHxEz+J+cyvqywJHHg5Uww0xNThQ+3ibF8Mj4NdRQZUiC X-Received: by 10.112.180.74 with SMTP id dm10mr4997982lbc.11.1426822505725; Thu, 19 Mar 2015 20:35:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.2 with SMTP id m2ls373106laj.72.gmail; Thu, 19 Mar 2015 20:35:05 -0700 (PDT) X-Received: by 10.112.13.7 with SMTP id d7mr8287685lbc.79.1426822505585; Thu, 19 Mar 2015 20:35:05 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id t5si2302254laj.59.2015.03.19.20.35.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 20:35:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbcgn8 with SMTP id gn8so66637287lbc.2 for ; Thu, 19 Mar 2015 20:35:05 -0700 (PDT) X-Received: by 10.152.178.197 with SMTP id da5mr73217467lac.56.1426822505129; Thu, 19 Mar 2015 20:35:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp775837lbj; Thu, 19 Mar 2015 20:35:04 -0700 (PDT) X-Received: by 10.66.100.138 with SMTP id ey10mr176553073pab.142.1426822503408; Thu, 19 Mar 2015 20:35:03 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ww5si6715173pab.117.2015.03.19.20.35.02; Thu, 19 Mar 2015 20:35:03 -0700 (PDT) Received-SPF: none (google.com: linux-usb-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751151AbbCTDe5 (ORCPT + 4 others); Thu, 19 Mar 2015 23:34:57 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:33621 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750889AbbCTDe4 (ORCPT ); Thu, 19 Mar 2015 23:34:56 -0400 Received: by pdnc3 with SMTP id c3so95794512pdn.0 for ; Thu, 19 Mar 2015 20:34:56 -0700 (PDT) X-Received: by 10.66.219.130 with SMTP id po2mr180228027pac.98.1426822496313; Thu, 19 Mar 2015 20:34:56 -0700 (PDT) Received: from localhost ([122.167.64.77]) by mx.google.com with ESMTPSA id e4sm5346000pdm.70.2015.03.19.20.34.55 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 19 Mar 2015 20:34:55 -0700 (PDT) From: Viresh Kumar To: Greg Kroah-Hartman Cc: linaro-kernel@lists.linaro.org, linux-usb@vger.kernel.org, Viresh Kumar Subject: [PATCH 1/2] USB: Use usb_disabled() consistently Date: Fri, 20 Mar 2015 09:04:40 +0530 Message-Id: <2514348e278c1271496eda5311851fcd86c06df9.1426822449.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.3.0.rc0.44.ga94655d Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , At few places we have used usb_disabled() and at other places used 'nousb' directly. Lets be consistent and use usb_disabled(); Signed-off-by: Viresh Kumar --- drivers/usb/core/usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index b1fb9aef0f5b..006951728520 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -1045,7 +1045,7 @@ static void usb_debugfs_cleanup(void) static int __init usb_init(void) { int retval; - if (nousb) { + if (usb_disabled()) { pr_info("%s: USB support disabled\n", usbcore_name); return 0; } @@ -1102,7 +1102,7 @@ static int __init usb_init(void) static void __exit usb_exit(void) { /* This will matter if shutdown/reboot does exitcalls. */ - if (nousb) + if (usb_disabled()) return; usb_deregister_device_driver(&usb_generic_driver);