From patchwork Thu Feb 2 21:33:18 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: 9553259 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 EA94860405 for ; Thu, 2 Feb 2017 21:33:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC6C828499 for ; Thu, 2 Feb 2017 21:33:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE833284BC; Thu, 2 Feb 2017 21:33:51 +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 6163828499 for ; Thu, 2 Feb 2017 21:33:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751903AbdBBVdq (ORCPT ); Thu, 2 Feb 2017 16:33:46 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:36537 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751867AbdBBVdp (ORCPT ); Thu, 2 Feb 2017 16:33:45 -0500 Received: by mail-lf0-f65.google.com with SMTP id h65so39306lfi.3 for ; Thu, 02 Feb 2017 13:33:44 -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=R8t9EJSUuX9LXQowp25q/0etGePkJ3N2Tb7ETACoJXI=; b=VnW86NW2nAiSeQHG0rRsyuTT7nvT0ASARCLknMxkRQf9XQiJBxFbGmbVlhJpqVB3+Q 3Ily+epmDzBa7Jc64JfqYHMvZgjK+GhvBz+2TtW3tSaV2EFX3sm33jQbwzO1ZQX+DT8O Q+y7XVj6BsZHG8i66wQNc0d+1bdlyAgEppnrtST74I8QaHfSd0KswlLOkbHZZrBx8JSE Jq3mRIlv3O8wDiw0SAoV7ryCVNc7ulzpS75X5eOuF4Dodq/ChYUJevU5lOvDq3WgaNRr 14hEF52y/LDHNy3W+u4iekFkXplz3LrGnErVLWiFd6SttZLnvmJLCx8HbdcfEmS1HhWd 4cWQ== 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=R8t9EJSUuX9LXQowp25q/0etGePkJ3N2Tb7ETACoJXI=; b=XIQoBmh80eeyXV0GFXuwE7671XztxEZvleRoXSOmFJ+HhSebmErrMv4veEKtM20UgE wEII6qGHGpR32pE4s/LCN+NNnuiuzSNXL9fH5sLJqfepYUDJrLMi2sZYlPoIwbAnLVGI 2+eZfO4n2ed0j28pteYchFceFF5SGDUauwGyyp/vQ7iaREUdB73qS1JX9ngOTVTfuf0r AVugNtRPq8fN/aAG8EFro+sJSWeSlVTve1ghXPULda3AATs0YFK98ZY0BhP6LLHwOjl8 xYeqFbHzDEg+pWh389wXobDasJpnGwgUZo8rjs9E6Ua2dWd9oSsAl2hGuUMema9gvBnc 4cpQ== X-Gm-Message-State: AIkVDXKttiyKsXuvAokUYff0KPalstp+WrZP7fnMBiFJNH1ICuDX8/jtKygGR/XIMF/2ew== X-Received: by 10.25.21.205 with SMTP id 74mr3845198lfv.182.1486071223781; Thu, 02 Feb 2017 13:33:43 -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 1sm2590003ljv.40.2017.02.02.13.33.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Feb 2017 13:33:43 -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 V3 6/9] brcmfmac: usb: store private pointer to struct brcmf_pub Date: Thu, 2 Feb 2017 22:33:18 +0100 Message-Id: <20170202213321.11591-6-zajec5@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170202213321.11591-1-zajec5@gmail.com> References: <20170202213321.11591-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 Having access to this struct is useful for using generic stuff and e.g. improving logging messages. Signed-off-by: Rafał Miłecki --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c index d93ebbdc7737..523949c44861 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c @@ -174,6 +174,7 @@ struct brcmf_usbdev_info { bool wowl_enabled; struct brcmf_mp_device *settings; + struct brcmf_pub *pub; }; static void brcmf_usb_rx_refill(struct brcmf_usbdev_info *devinfo, @@ -1135,26 +1136,29 @@ static const struct brcmf_bus_ops brcmf_usb_bus_ops = { static int brcmf_usb_bus_setup(struct brcmf_usbdev_info *devinfo) { + struct device *dev = devinfo->dev; + struct brcmf_bus *bus = dev_get_drvdata(dev); int ret; /* Attach to the common driver interface */ - ret = brcmf_attach(devinfo->dev, devinfo->settings); + ret = brcmf_attach(dev, devinfo->settings); if (ret) { brcmf_err("brcmf_attach failed\n"); return ret; } + devinfo->pub = bus->drvr; - ret = brcmf_usb_up(devinfo->dev); + ret = brcmf_usb_up(dev); if (ret) goto fail; - ret = brcmf_bus_started(devinfo->dev); + ret = brcmf_bus_started(dev); if (ret) goto fail; return 0; fail: - brcmf_detach(devinfo->dev); + brcmf_detach(dev); return ret; }