From patchwork Wed Jan 18 10:48:53 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: 9523101 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 DA793601B7 for ; Wed, 18 Jan 2017 10:49:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D971C285D1 for ; Wed, 18 Jan 2017 10:49:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE4B2285D6; Wed, 18 Jan 2017 10:49:27 +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 88E95285D1 for ; Wed, 18 Jan 2017 10:49:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751944AbdARKtZ (ORCPT ); Wed, 18 Jan 2017 05:49:25 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:35778 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751692AbdARKtY (ORCPT ); Wed, 18 Jan 2017 05:49:24 -0500 Received: by mail-lf0-f67.google.com with SMTP id v186so1176697lfa.2 for ; Wed, 18 Jan 2017 02:49:23 -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=sL+eLNdtMBh4E0yFHAP2HfqA62jUkpRudBYB6iHtEOg=; b=tZ6fd71DCs5mr1G3HvsIAVnchWFzy+HomZRktwU+pX7liBUyu6jwTio9TfDZ0cvMGd /QAqQFds+M7uYn4L8QWknRADOJYyv2Zp8mPVEF3pjOfYvDmqt6YCjAlw1gIO9XVA/bkD oItAMkwbCQCfRqNoGxhCIo2/qck6SMQy0Icq2pxJjc3PNk4cPLd/pDS0ulmp6AqvKCEZ lZ/9CgKxsqvyN6DXeFGPRCKu9VGFJKjwtHnkD8yUGOzxwJ6vWyGinOaZbNHyTjPRX2yq pklsj4xklIkcuLTYV6k0CynKcoLjUouecJq2G6eVweylsFPn1VIscfaGT9OWyJF2xIwe tofg== 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=sL+eLNdtMBh4E0yFHAP2HfqA62jUkpRudBYB6iHtEOg=; b=B9ILU09PNJyUYkgsan7Fhhjh7lwhOKGcmF0miZWFljqNH+uMFAm/xdU5TK82H/IqJc 4XRSFl5DL3QG/ycYvRlZ8bzAAzm90Xd8PVVbVJtqx5ZMJ0LB3y+TuBoZK588G4yApHXs dEIFDahXPfO4k7rEboOE0CJzqhaj793T5bEoxIybqbqqephl54QCdiuLPY0woCkGQISK IJ1CYoGEcWveSSVZvvN7EiULYyaAjnJFg22wHS2Abw4KkWIFQBMZ5TqSX1dqWpglwZP0 CgMsD0jbA2qUFZ6c732qqiA0COMSfk10YaQNuPIPhyD0oXvqAneljbbEKmz28s8uHlJB W0rg== X-Gm-Message-State: AIkVDXKrK4FQc2MZ55wKyIB/dWzDFjQg6Ijszm2zNximGiw9fKulwIXSB8umkJUD17lmNQ== X-Received: by 10.25.166.131 with SMTP id p125mr835009lfe.142.1484736562580; Wed, 18 Jan 2017 02:49:22 -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 d79sm10281578lfd.46.2017.01.18.02.49.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jan 2017 02:49:21 -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 V2 3/4] brcmfmac: drop brcmf_bus_detach and inline its code Date: Wed, 18 Jan 2017 11:48:53 +0100 Message-Id: <20170118104854.32231-3-zajec5@gmail.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170118104854.32231-1-zajec5@gmail.com> References: <20170118104854.32231-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 9e6f60a..372d2c4 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);