From patchwork Thu Aug 22 13:47:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13773550 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C069CC52D7C for ; Thu, 22 Aug 2024 13:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/H9qQSvRoJEHuC9fzeIRZ7nyD5NIc+bT7koxtRIZd8A=; b=BwsTPRqoh5rYW18IgAUG9YTW0/ UvCfW9HX6AJfPLGIEtnMQmC5FT+Czr2TeyvMHomVVGiMrkYEdpLIQ9pIvCcjSIj7m39o4Ji15184i BF3ZHCUSvj5Xf1Gj0CtLIyp9xfvgufOUMa+Ftj5sxv22o39kPM/QWxqJUspoF/u8zP/UcKss8hssJ E1cLWgFlA+rQWz57KDprYa72WIpLCfIlTifEkRFUZd/hRxpLCVvKwhYkmhv1HS8bqdPt9abGjTEgB OR62TbFbWXpKG2nUixJ20Ssnu2vdK0SfNiVbiIkQwUli0ELUsurO0ngsKcoIZP7Ge32FJB+N0zFAt As7ytG8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh8EC-0000000D296-2RUJ; Thu, 22 Aug 2024 13:51:52 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh8Ab-0000000D0jH-1HBK for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 13:48:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724334488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/H9qQSvRoJEHuC9fzeIRZ7nyD5NIc+bT7koxtRIZd8A=; b=VKQFNo/vMjKYNckCAZArW4YnbviMuwZmY2gZVnjAlDEsyeidUjqnpRnKMrb2ZVS0kDRTR8 9Rh8E0807s2ahr/D0BI8ne2Idhh34+36GxVPCesZob6iuBXNlkZdrDGhXJ/6KEePOjDVim zCmRU/3QVkx/8s+Z/Sq5NiyNSvCnYuU= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-688-IAe-4o5fMR2lSx2VqMlDpw-1; Thu, 22 Aug 2024 09:48:05 -0400 X-MC-Unique: IAe-4o5fMR2lSx2VqMlDpw-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-372fe1ba9a6so440214f8f.1 for ; Thu, 22 Aug 2024 06:48:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724334484; x=1724939284; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/H9qQSvRoJEHuC9fzeIRZ7nyD5NIc+bT7koxtRIZd8A=; b=ZbjCCL0Ms8Gix1vmnLjuVK6L305XhZVV17OEm/9IoNTgwVCMAu7oUKU6z7/8nRcoFa TBeui0vQNNQSfzX8Nw1NHWVvCpEXc64JN1rl4VYDKTNy1I9JNYGh8gFGhLsm3ihARsSf 5kF3vFvE+YijpednKvDswYVlHcTZxn/+VSxX05rQmFSj9aLzTDvcE2Onk9QNaXeKAtTx hNGqgjePjtlhN0sM7n6NpPNFLCopF9FvW3pVYe+4qlcXIEF2lWXH6c8hZ4Qj42FLfUIF mQkvmEfvYVxDh5WF1tznq8veLv5GFi+HZFA21gsVj+DbfEMVxyXnvgbjeZ7M5DigYdaR qdEA== X-Forwarded-Encrypted: i=1; AJvYcCUB4RTs1yqUz7ZEaO7fAAACEbJkKSyB8Zw6BK4QMIobLT/UnJOlRfo8vFzKxdukj8c4B694m5ePI5T0Vk/0kIwO@lists.infradead.org X-Gm-Message-State: AOJu0YwJo/Q4x33TBcukkjlrPzH3NtVFmmKMWujbMALWMHhFpAefP5Ig K/qY8VgrdxrhLYPdrfJGkgiSF3pfFGKkRCpvBJnJblLnHktNR2MhrN1Wn8F81UTGbMUM32RQMxq 9ZGm9epoeVd7oy9XzLvVnqHkkht1Q67SyQrrUFHYpmsSHoYtvfLk8tDVGToQTy4OzCBemldeE X-Received: by 2002:adf:f802:0:b0:371:8c06:82ee with SMTP id ffacd0b85a97d-372fd82c3dcmr3699818f8f.49.1724334484243; Thu, 22 Aug 2024 06:48:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/dGSNW4Q5J8zIjht7W8w6lm/DRlJe50ZIJE1uWbGQpR5tL77ENnUxbm6ccKv01r659J3/tA== X-Received: by 2002:adf:f802:0:b0:371:8c06:82ee with SMTP id ffacd0b85a97d-372fd82c3dcmr3699770f8f.49.1724334483816; Thu, 22 Aug 2024 06:48:03 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ac5162322sm25057215e9.24.2024.08.22.06.48.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 06:48:03 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Jens Axboe , Wu Hao , Tom Rix , Moritz Fischer , Xu Yilun , Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Bjorn Helgaas , Alvaro Karsz , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , =?utf-8?q?Eugenio_P=C3=A9rez?= , Richard Cochran , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Philipp Stanner , Damien Le Moal , Hannes Reinecke , Chaitanya Kulkarni Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fpga@vger.kernel.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, virtualization@lists.linux.dev, Bartosz Golaszewski Subject: [PATCH v3 4/9] gpio: Replace deprecated PCI functions Date: Thu, 22 Aug 2024 15:47:36 +0200 Message-ID: <20240822134744.44919-5-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240822134744.44919-1-pstanner@redhat.com> References: <20240822134744.44919-1-pstanner@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_064809_430874_716C1EA5 X-CRM114-Status: GOOD ( 13.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org pcim_iomap_regions() and pcim_iomap_table() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace those functions with calls to pcim_iomap_region(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Acked-by: Bartosz Golaszewski --- drivers/gpio/gpio-merrifield.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpio/gpio-merrifield.c b/drivers/gpio/gpio-merrifield.c index 421d7e3a6c66..274afcba31e6 100644 --- a/drivers/gpio/gpio-merrifield.c +++ b/drivers/gpio/gpio-merrifield.c @@ -78,24 +78,24 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id if (retval) return retval; - retval = pcim_iomap_regions(pdev, BIT(1) | BIT(0), pci_name(pdev)); - if (retval) - return dev_err_probe(dev, retval, "I/O memory mapping error\n"); - - base = pcim_iomap_table(pdev)[1]; + base = pcim_iomap_region(pdev, 1, pci_name(pdev)); + if (IS_ERR(base)) + return dev_err_probe(dev, PTR_ERR(base), "I/O memory mapping error\n"); irq_base = readl(base + 0 * sizeof(u32)); gpio_base = readl(base + 1 * sizeof(u32)); /* Release the IO mapping, since we already get the info from BAR1 */ - pcim_iounmap_regions(pdev, BIT(1)); + pcim_iounmap_region(pdev, 1); priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; priv->dev = dev; - priv->reg_base = pcim_iomap_table(pdev)[0]; + priv->reg_base = pcim_iomap_region(pdev, 0, pci_name(pdev)); + if (IS_ERR(priv->reg_base)) + return dev_err_probe(dev, PTR_ERR(base), "I/O memory mapping error\n"); priv->pin_info.pin_ranges = mrfld_gpio_ranges; priv->pin_info.nranges = ARRAY_SIZE(mrfld_gpio_ranges);