From patchwork Tue Jan 17 19:23:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 9521789 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BD8CA60244 for ; Tue, 17 Jan 2017 19:23:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4854285B2 for ; Tue, 17 Jan 2017 19:23:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8FEE285A8; Tue, 17 Jan 2017 19:23:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45FC9285A8 for ; Tue, 17 Jan 2017 19:23:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751220AbdAQTXi (ORCPT ); Tue, 17 Jan 2017 14:23:38 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:36362 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952AbdAQTXh (ORCPT ); Tue, 17 Jan 2017 14:23:37 -0500 Received: by mail-lf0-f67.google.com with SMTP id h65so17490844lfi.3 for ; Tue, 17 Jan 2017 11:23:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=O2ALB/LN/xtk3qm0woBcNMj0/N1edBifh4m15YeHoOo=; b=BQHFx1e64bHd0mBKKzbnQ+Agwoio0Xg9m4ayJSZhiA7U8fnWOhiD22DdArI2sAES/o jmoVo3ouXeMbtgDggS83ml2wMMvIVDeTD14YiyNuuufcvhhooz/8t2FjuwaGgDuRqkfl cQQTjYqCXw6mS0EpcJow0uEtSQm2GEqfMnEl8ja1PJUzLmWnKvN4YQ8I7bQNho8KHz6F xC64kYAq6Pcr/zM9eR1t5Qo++ltXmfNElnd9+16aNNMJfX+wF3iwnCX85h8T/dumivKK tsHZsZXdP6r07pDKVzgye0qL4T8moew8FcmeEeIsITsE3U32blfcQxMzAnE78UlBy6WL +YJA== 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:mime-version:content-transfer-encoding; bh=O2ALB/LN/xtk3qm0woBcNMj0/N1edBifh4m15YeHoOo=; b=Q9OWVKPWbb3o3G7EgcnXUrKfZRGL2sWCP7g9SG5b56Tz1GNAkvX78EG5Y822OTlG2k nbiIfxQfdgSIDxieJriMvuS+pf7ruuQ6A+PLOVSYJYSTojYJzLl16CB4IsY4iDJNKXs5 MLwejreDX88DOLB2D1O0kXWOqK1ySlQ5f1roPZpM71/oMGtahMXcGINLbzLPzVAYI0kw sY8JIzjm91lpnr5Q2RLJOO/8vW40cXpyB4G1XnRJ0hoUbHY7DVr84p/Kd5HEHD/Hw8Ow 5JgSKU/Y2Z4x0SJ8h5NwZgQYrCDsf4X02tnicpKakjSV0Z287awKjl1o5UkXgKv5DzK2 PC8A== X-Gm-Message-State: AIkVDXJdKJIVL4AiAgQE+eYEcdkixHIwmO45sIYop4LfWUg1VBEcsNfmTcnnz/utXWO/Xw== X-Received: by 10.25.23.204 with SMTP id 73mr8617556lfx.29.1484681015318; Tue, 17 Jan 2017 11:23:35 -0800 (PST) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id s20sm8353497lfe.41.2017.01.17.11.23.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jan 2017 11:23:34 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo Cc: Arend van Spriel , Franky Lin , Hante Meuleman , Pieter-Paul Giesberts , Franky Lin , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH 2/2] brcmfmac: drop brcmf_bus_detach and inline its code Date: Tue, 17 Jan 2017 20:23:25 +0100 Message-Id: <20170117192325.14528-2-zajec5@gmail.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170117192325.14528-1-zajec5@gmail.com> References: <20170117192325.14528-1-zajec5@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafał Miłecki Driver used to call brcmf_bus_detach only from one place and it already contained a check for drvr not being NULL. We can get rid of this extra function, call brcmf_bus_stop directly and simplify the code. There also isn't brcmf_bus_attach function which one could expect so it looks more consistent this way. Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c index adf8eb1..122c79d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c @@ -1075,16 +1075,6 @@ void brcmf_bus_add_txhdrlen(struct device *dev, uint len) } } -static void brcmf_bus_detach(struct brcmf_pub *drvr) -{ - brcmf_dbg(TRACE, "Enter\n"); - - if (drvr) { - /* Stop the bus module */ - brcmf_bus_stop(drvr->bus_if); - } -} - void brcmf_dev_reset(struct device *dev) { struct brcmf_bus *bus_if = dev_get_drvdata(dev); @@ -1131,7 +1121,7 @@ void brcmf_detach(struct device *dev) brcmf_fws_deinit(drvr); - brcmf_bus_detach(drvr); + brcmf_bus_stop(drvr->bus_if); brcmf_proto_detach(drvr);