From patchwork Wed Jul 26 08:22:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 126222 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp276730vqo; Wed, 26 Jul 2023 02:25:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlGuoT0M8PDZ4TdXm0+clkxwMG48Ur+DQTMnJNGTV9oRBb5XzBZJ8dPjKE1jPdojlqvXxn4a X-Received: by 2002:a17:906:24b:b0:992:345e:8319 with SMTP id 11-20020a170906024b00b00992345e8319mr1373077ejl.58.1690363525738; Wed, 26 Jul 2023 02:25:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690363525; cv=none; d=google.com; s=arc-20160816; b=ELAj7aecH86Q4md7W9OYvgFlpOAkMsMipqQTihfIeIFFCEcDBUu8nIpeBfXwQ1lyjm 9E9/A58VeBJex9XdkbHMiNNJr3qWLh8fEKmnCBfsClAlieqSG17jjFCQ69FSCN3aMg67 v3s6zODSx4g4QpWXrSQwVSjwUTR/q0xG+0PrymJb1PqUmmmXjgGU8Zzg4kY0BWV6goSf cQ3EWIP88Cr/wIVLQfDkZpkC3J+oCJmqTanng9Ql0KApiFl0apq/IwRJPpCm3rik0a6c yDAmgC2ChOWDpzKXdBpBI+b5Uu+bpugfmZimbxtcCW0GdGm8VgGMLMKimFNOHEUNbCTZ vTXg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cim3JxghJDKsHICkdR0v/dbNBqJFqIm0rE5byICyyUQ=; fh=ClSCaUDR6rLSl56scU0nBrZI7ye6UdZxeH0WEDTywT0=; b=xSJxTrHI5VOs8NiPuOaoeIxlhHR7i8h8Vle10+nh5PGyPvTk7obA2EB5TzBCYoLkXo ZqkNONc80FfQttX3Z2ppzuIeBZme+D7MUTc8vVbWXZfye/QARxyObbkJ5hc1eUMKCyK4 2F9MYYKThX9DxCwmhg5EFneC+YKiLysmrJEz7DeOyoUxbK7yKDU4Je+tH/jv7lUi+3S7 qBwyYJNH8buxfx2b1q54dYroPfEyrdHwS/+0VMT4xq8e3iURxTpSqUP+I1vTKIomQZhI UiVBA6Z2xyW2mLbLy0U9Ved8ny4MIMXEb34xlHOf7MKUVgjmxzdPcNxDtSUaSd2ggeRe eOTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="Sl/qY5ET"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gu22-20020a170906f29600b0098862880ec0si8892111ejb.418.2023.07.26.02.25.01; Wed, 26 Jul 2023 02:25:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="Sl/qY5ET"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232926AbjGZIdm (ORCPT + 99 others); Wed, 26 Jul 2023 04:33:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233296AbjGZIcg (ORCPT ); Wed, 26 Jul 2023 04:32:36 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B3406E95 for ; Wed, 26 Jul 2023 01:23:01 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id EC4AC660711C; Wed, 26 Jul 2023 09:22:57 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1690359778; bh=2/PCXo0o2BSjM747Os2fuQqIWoXzN5M2Qfn+tk7CDoc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sl/qY5ETet3lsta3lwGrihco2MTuUXNJFHMfdAd6t64adYuvMGLwhfCT8hS2sTzY1 LpCd+3aJCSSC7fhCBMuvR9oyGqCfW2yPVrHzatw2G8Ksb1Qf9I7CdPD0//M0fn1MUY ybUOHwSmnAcUyTy3/ghEhTC2+2fpxExhD6ZP6LcWdD/5qQ/4iL7OajKYYDPC4wKBdy cG+2vgs+eeGtON8oKy/5uE9zAwxqCbLH2/amKG/DO69kS6YA3Ai+7Web2zReisjvUk le8Gsyz1X1sUgBBCBvAAug9h5Cv2n2fBDi9MVqbGOP7E7A8L7R6etZf65xF6vDwV7y DzaIbEQWHobyg== From: AngeloGioacchino Del Regno To: chunkuang.hu@kernel.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, fshao@chromium.org, CK Hu Subject: [PATCH v3 5/6] drm/mediatek: mtk_dpi: Use devm_platform_ioremap_resource() Date: Wed, 26 Jul 2023 10:22:44 +0200 Message-ID: <20230726082245.550929-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230726082245.550929-1-angelogioacchino.delregno@collabora.com> References: <20230726082245.550929-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772474624293003905 X-GMAIL-MSGID: 1772474624293003905 Instead of the open-coded platform_get_resource, devm_ioremap_resource switch to devm_platform_ioremap_resource(), also dropping the useless struct resource pointer, which becomes unused. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Fei Shao Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_dpi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 2c95de5539fd..a6fa26301a58 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -1006,7 +1006,6 @@ static int mtk_dpi_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_dpi *dpi; - struct resource *mem; int ret; dpi = devm_kzalloc(dev, sizeof(*dpi), GFP_KERNEL); @@ -1037,8 +1036,7 @@ static int mtk_dpi_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "Cannot find pinctrl active!\n"); } } - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dpi->regs = devm_ioremap_resource(dev, mem); + dpi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dpi->regs)) return dev_err_probe(dev, PTR_ERR(dpi->regs), "Failed to ioremap mem resource\n");