From patchwork Sat Aug 25 10:40:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10576109 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03BB2109C for ; Sat, 25 Aug 2018 10:41:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E64522AF1F for ; Sat, 25 Aug 2018 10:41:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D988A2B009; Sat, 25 Aug 2018 10:41:52 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 61D572AF1F for ; Sat, 25 Aug 2018 10:41:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=TbHC8MlFukVxXDtSXZKXHXqZGWonARkHAyuYCqc+8ZU=; b=t3+ 7evUAGuasexy3hZRy7ohgVd1DFJWPcqmuJL5uAwLhiLd3BrF3J9T4nCUzea/cAyRRF4qMlnnAzkt+ TYVkJEYijUYS5Cpn203vLcZpqjovCpm1xW76UcBn04KIKTPwBwNCjvlKjXoswbVM0fkVA4HVe4v0i IMigRjaXG7r55SVBAYQxSgp90nFWv9VkBd9oigzlbw9RM6OWP1F0rTF4+tT/8lAMW0BsenKe7XMpl KmJScMd72v9OfgesLFVH16DeNLwqnp3h/p5UmqsJOJNAvizv/3qKSu0KyJe+PtXKQlroAhS7X+RhY ElwsD7RiRkV92nauuF5XJwQMSdFqp3g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ftW0r-0005FT-BW for patchwork-linux-mediatek@patchwork.kernel.org; Sat, 25 Aug 2018 10:41:49 +0000 Received: from mail-wr1-f68.google.com ([209.85.221.68]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ftW0N-0004w4-0E for linux-mediatek@lists.infradead.org; Sat, 25 Aug 2018 10:41:23 +0000 Received: by mail-wr1-f68.google.com with SMTP id j26-v6so9467777wre.2 for ; Sat, 25 Aug 2018 03:41:14 -0700 (PDT) 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; bh=Kjpo9XP6rmB6ejBt3e2nyHnDGbXn1m1HwplfKTXpOzA=; b=apwg/3ksSojH99fWL7Ol2/FEDkxxhpjXuO0I7Xz0mkupttckPz865eASm0bfEeleUT +8c64Suj7wiKgIeYMT2+HdhJU/ZaIs/x6iLc7m/cEr/RRKHFqTUjimxMe2qv0HmbqHwb pwXPD+BhRBL/R+pvxeoi0G3qwm+MT9flpPbdKeYtuxVP2jn7y5AfsP2D5oV1y7+qzUqo L3bQFFo3k1Tlyb3SIJUVeZGmFOZAnkill3c2nB0BsKyqFOZfnedQhTYNFVotzQ3SO31R Cw5pY73DZwGgHtD5f380TfQX2qLgQAH6jyU9wvQBV6qEQYTJQbq8EglPTUqkuLz/MDNn pPkw== X-Gm-Message-State: APzg51Db/hFUupYBtGb9BYJXx4gmsPQVWD1Bwox6cr3ERjGWwaaiwlrv w34K0MZQmpPNb6a3iSHYpEy5yA== X-Google-Smtp-Source: ANB0VdZ7iVNu32djhcbLnAQ6Ks6RjnSNmo/YdOhF04VaXS/sruuWbMJios3Rw9llwTOo/yL0qW+eVQ== X-Received: by 2002:adf:eaca:: with SMTP id o10-v6mr3350026wrn.98.1535193672755; Sat, 25 Aug 2018 03:41:12 -0700 (PDT) Received: from localhost.localdomain ([151.66.53.29]) by smtp.gmail.com with ESMTPSA id l18-v6sm16391708wru.75.2018.08.25.03.41.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Aug 2018 03:41:12 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Subject: [PATCH 10/16] mt76x0: remove mt76x0_complete_urb routine Date: Sat, 25 Aug 2018 12:40:50 +0200 Message-Id: <20180825104056.9130-11-lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180825_034119_088437_7EF38685 X-CRM114-Status: GOOD ( 10.37 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, linux-mediatek@lists.infradead.org, sgruszka@redhat.com MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Remove mt76x0_complete_urb routine and use mt76u_mcu_complete_urb utility function as usb mcu completion handler Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c | 6 +++--- drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 7 ------- drivers/net/wireless/mediatek/mt76/mt76x0/usb.h | 1 - 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c b/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c index bfaabe018216..3f985c1d45f0 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c @@ -113,7 +113,7 @@ static int mt76x0_mcu_wait_resp(struct mt76x0_dev *dev, u8 seq) ret = mt76x0_usb_submit_buf(dev, USB_DIR_IN, MT_EP_IN_CMD_RESP, &dev->mcu.resp, GFP_KERNEL, - mt76x0_complete_urb, + mt76u_mcu_complete_urb, &usb->mcu.cmpl); if (ret) return ret; @@ -412,7 +412,7 @@ static int __mt76x0_dma_fw(struct mt76x0_dev *dev, buf.len = MT_DMA_HDR_LEN + len + 4; ret = mt76x0_usb_submit_buf(dev, USB_DIR_OUT, MT_EP_OUT_INBAND_CMD, &buf, GFP_KERNEL, - mt76x0_complete_urb, &cmpl); + mt76u_mcu_complete_urb, &cmpl); if (ret) return ret; @@ -624,7 +624,7 @@ int mt76x0_mcu_cmd_init(struct mt76x0_dev *dev) ret = mt76x0_usb_submit_buf(dev, USB_DIR_IN, MT_EP_IN_CMD_RESP, &dev->mcu.resp, GFP_KERNEL, - mt76x0_complete_urb, &usb->mcu.cmpl); + mt76u_mcu_complete_urb, &usb->mcu.cmpl); if (ret) { mt76x0_usb_free_buf(dev, &dev->mcu.resp); return ret; diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c index a9835bb7b921..fcca1e990475 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c @@ -93,13 +93,6 @@ int mt76x0_usb_submit_buf(struct mt76x0_dev *dev, int dir, int ep_idx, return ret; } -void mt76x0_complete_urb(struct urb *urb) -{ - struct completion *cmpl = urb->context; - - complete(cmpl); -} - int mt76x0_vendor_request(struct mt76x0_dev *dev, const u8 req, const u8 direction, const u16 val, const u16 offset, void *buf, const size_t buflen) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.h b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.h index 931c36554ff4..0d1ba95dcf2e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.h @@ -49,7 +49,6 @@ void mt76x0_usb_free_buf(struct mt76x0_dev *dev, struct mt76x0_dma_buf *buf); int mt76x0_usb_submit_buf(struct mt76x0_dev *dev, int dir, int ep_idx, struct mt76x0_dma_buf *buf, gfp_t gfp, usb_complete_t complete_fn, void *context); -void mt76x0_complete_urb(struct urb *urb); int mt76x0_vendor_request(struct mt76x0_dev *dev, const u8 req, const u8 direction, const u16 val, const u16 offset,