From patchwork Sun Nov 19 10:59:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 166757 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp1593696vqn; Sun, 19 Nov 2023 03:00:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHgzKGqtbt2rAnoThGgRGaoSZ4uzXGZK0q7xIcIgEGTboBKxY4BIpqzfxCqf/rrdznAq84t X-Received: by 2002:a05:6358:882c:b0:16b:c4f1:216 with SMTP id hv44-20020a056358882c00b0016bc4f10216mr4293557rwb.25.1700391650724; Sun, 19 Nov 2023 03:00:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700391650; cv=none; d=google.com; s=arc-20160816; b=SFBH5nY9MitY7BgE+w3QK/JMGN4zBaEv2eZBQ5fHZxw2+k3yOjcsUjVxMh6Qp9CJTm skoujbEZCISGK1pK4tsvAC8gl9iVUBgwuXfuZiWOISUZbYtq2xH/X3wCg6aI2tXvkbKu 4N+jKgKDBXW5ndb/aQhHOuqrtcN1oP/6DcmaUuyZK4LwcdHgJUj6cZ8A/TO3MypxFZuq 9wUI0PQAJ5xbY8U72UJdkvuspRmwydzW2YUWi2+MoaSG/VAAZ2g7pdFQozDbQuCiEoij sbOEOrDOrLmsN5ljBXmOqWydvz3o6cNy8yfynGy+GHnfBf0TDeATCFOy5COU+YzJfMy6 C/fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MntiypTvXcH5bZA1OG0dGkr+lu0AvoaryKrACfMPtnw=; fh=Iwyfjt4JIDBph/QRUs2w5fjXCnux8DByZAZH468ckvk=; b=ViNA2kKlj0JceI36LN6pvanrA6qClRDNHm273GrSDPFV7Fs98tzApIwL8yoVts36gK IoosR2wK/cN4yn1KIUykOwqQ720+9XiosvbcGK3hTI811NRsEQDEdL7D6tzpdPTVLeu2 meP9WZrGE1rIUSKBwmfiI/xLCS+R14v6WExq+DyeQJlJLml7h7xgAjWHK9gFYzYL61xR gxFk+oRY8TDEFuaWK7S+jZJ4CsEjmkpZaa8GlH9UDJqEt1erxZFogMFTzP6Alc18qc/V BThZSIPp/gZLlXCVOAoBm/LKtmISsvhahof3sD9KJrx3ZN4JmbRvsrkx10QlpPZaetLW opow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=bMrCvuAg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id f2-20020a63dc42000000b005c1cc7273bbsi5945203pgj.746.2023.11.19.03.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 03:00:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=bMrCvuAg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 9E420807C5DE; Sun, 19 Nov 2023 03:00:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230159AbjKSLAB (ORCPT + 99 others); Sun, 19 Nov 2023 06:00:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229703AbjKSLAA (ORCPT ); Sun, 19 Nov 2023 06:00:00 -0500 Received: from smtp.smtpout.orange.fr (smtp-30.smtpout.orange.fr [80.12.242.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43718129 for ; Sun, 19 Nov 2023 02:59:56 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id 4fWqr551gODaN4fWrr4GNd; Sun, 19 Nov 2023 11:59:53 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1700391593; bh=MntiypTvXcH5bZA1OG0dGkr+lu0AvoaryKrACfMPtnw=; h=From:To:Cc:Subject:Date; b=bMrCvuAgtvmmR0/etLtFuypEUjyUp6OYUcbQWc8r6Q0IkSR3kSUM2I3BcjG+ferfY lscEi6ZhMVjr6zYkHhxEA+O3FZ74e0VoO+IwTROi4Yluj0666jCVd1STwnJ56EjbCW OyrCVDTu1NsvlMHnsPL86jn72PW65Np2L2N4VLh5D0qXovLk41ODZVtcOKuBwMxtRC uU7VjVF00AzOGFpZ9+SdAAJUvQBQsGJyWZ+GSRn2c9zjZgjzjnn6/rrW+u5Nxo3e2x XGN+j0ZtFYR974bT5LsVsooavhk2yFfOvjULJFCPwSZFkXA9L2lf3NDIxQjSLobqpM Bn1ZQGIl6fYJg== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 19 Nov 2023 11:59:53 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Mark Brown Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-spi@vger.kernel.org Subject: [PATCH] spi: ingenic: convert not to use dma_request_slave_channel() Date: Sun, 19 Nov 2023 11:59:50 +0100 Message-Id: <1c88236b5d6bff0af902492ea9e066c8cb0dfef5.1700391566.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sun, 19 Nov 2023 03:00:12 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782989875298512335 X-GMAIL-MSGID: 1782989875298512335 dma_request_slave_channel() is deprecated. dma_request_chan() should be used directly instead. Switch to the preferred function and update the error handling accordingly. Signed-off-by: Christophe JAILLET --- drivers/spi/spi-ingenic.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-ingenic.c b/drivers/spi/spi-ingenic.c index cc366936d72b..003a6d21c4c3 100644 --- a/drivers/spi/spi-ingenic.c +++ b/drivers/spi/spi-ingenic.c @@ -346,14 +346,17 @@ static bool spi_ingenic_can_dma(struct spi_controller *ctlr, static int spi_ingenic_request_dma(struct spi_controller *ctlr, struct device *dev) { - ctlr->dma_tx = dma_request_slave_channel(dev, "tx"); - if (!ctlr->dma_tx) - return -ENODEV; + struct dma_chan *chan; - ctlr->dma_rx = dma_request_slave_channel(dev, "rx"); + chan = dma_request_chan(dev, "tx"); + if (IS_ERR(chan)) + return PTR_ERR(chan); + ctlr->dma_tx = chan; - if (!ctlr->dma_rx) - return -ENODEV; + chan = dma_request_chan(dev, "rx"); + if (IS_ERR(chan)) + return PTR_ERR(chan); + ctlr->dma_rx = chan; ctlr->can_dma = spi_ingenic_can_dma;