From patchwork Mon Feb 19 23:14:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 10229219 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 E0E62602B7 for ; Mon, 19 Feb 2018 23:14:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDEA626E4A for ; Mon, 19 Feb 2018 23:14:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0C9C26E7B; Mon, 19 Feb 2018 23:14:54 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 764C326E4A for ; Mon, 19 Feb 2018 23:14:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932245AbeBSXOu (ORCPT ); Mon, 19 Feb 2018 18:14:50 -0500 Received: from rnd-relay.smtp.broadcom.com ([192.19.229.170]:47999 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932343AbeBSXOe (ORCPT ); Mon, 19 Feb 2018 18:14:34 -0500 Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 16B3630C02D; Mon, 19 Feb 2018 15:14:34 -0800 (PST) Received: from bld-bun-01.bun.broadcom.com (bld-bun-01.bun.broadcom.com [10.176.128.83]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id AB05881EC6; Mon, 19 Feb 2018 15:14:33 -0800 (PST) Received: by bld-bun-01.bun.broadcom.com (Postfix, from userid 25152) id 42EECB050D9; Tue, 20 Feb 2018 00:14:31 +0100 (CET) From: Arend van Spriel To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Arend van Spriel Subject: [PATCH 4/8] brcmfmac: usb: call brcmf_usb_up() during brcmf_bus_preinit() Date: Tue, 20 Feb 2018 00:14:21 +0100 Message-Id: <1519082065-10128-5-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1519082065-10128-1-git-send-email-arend.vanspriel@broadcom.com> References: <1519082065-10128-1-git-send-email-arend.vanspriel@broadcom.com> 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 By calling brcmf_usb_up() during brcmf_bus_preinit() it does not need to be called in brcmf_usb_bus_setup(). Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c index b27170c..d22cd166 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c @@ -1146,8 +1146,9 @@ static int brcmf_usb_get_fwname(struct device *dev, u32 chip, u32 chiprev, } static const struct brcmf_bus_ops brcmf_usb_bus_ops = { - .txdata = brcmf_usb_tx, + .preinit = brcmf_usb_up, .stop = brcmf_usb_down, + .txdata = brcmf_usb_tx, .txctl = brcmf_usb_tx_ctlpkt, .rxctl = brcmf_usb_rx_ctlpkt, .wowl_config = brcmf_usb_wowl_config, @@ -1165,10 +1166,6 @@ static int brcmf_usb_bus_setup(struct brcmf_usbdev_info *devinfo) return ret; } - ret = brcmf_usb_up(devinfo->dev); - if (ret) - goto fail; - ret = brcmf_bus_started(devinfo->dev); if (ret) goto fail;