From patchwork Fri Oct 25 14:59:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 838832 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2086D20D504 for ; Fri, 25 Oct 2024 15:00:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868463; cv=none; b=fiTNid3MMwQYQRYxMtzojufd9IivEkHwud39N7W0GtOo68a//zia9QSc4QrW2KdG7zDpTnVspwUyVL7NhuPB3NEhU/bVC2WJeBU3bWuSiyT4PM9KswbPnJbxpvEGXTTCgyx86/uXd6ve0DWMJRzVZ0igWdxcEuRmu34WVxpsFyI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868463; c=relaxed/simple; bh=RRyy0x2PiBX++bfjCGlA/9AZOm7xwGM5wtpW6IKXyVc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o0EBevuRLe/Hbg+QISyrNXSeh61aivZmjqzjnEDhvKIhwu8wCUI8ln0cHPlrUgE36R04nXpY6PtDkrgPJfo4YHI9DXfjBf7w+ZPJf2EwJm4q3jWY+ZnI+e41O0bntNLraLCoYDe0rbMURqK1xIl6lmvTkjFWueq5CGdwyKFtCn8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=f0hQVPjd; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="f0hQVPjd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WxQ5Vib/1yt2THpDXWI2rA9CY+VRhy0DxtAlfuLaLe4=; b=f0hQVPjdlwleY7yTJtNDc+/fnySlebBu0B5Avm3LeDcCiO+dkmgsFZ1RIJqzrWgwJW79DZ 5Fck5+D+7jh1c4UtJlIxiJ90VjyRBunQE5TaAdrjNjEvoCKun9HBtp4QLeZkmamy9JpZyq XwlxB9AuilZfl0X5exFaqO3hlNj165M= 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-120-jgyzPVl-MeiRdk6T1dQmZg-1; Fri, 25 Oct 2024 11:00:56 -0400 X-MC-Unique: jgyzPVl-MeiRdk6T1dQmZg-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d3e8dccc9so1335983f8f.1 for ; Fri, 25 Oct 2024 08:00:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868455; x=1730473255; 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=WxQ5Vib/1yt2THpDXWI2rA9CY+VRhy0DxtAlfuLaLe4=; b=Qai9aPpOPh99yEqbhjtF3KfGqlwYFwCZ7QWclUeWjwFuty2INz3dqA3PgRnr3fj8/Z 4T1uPcdeRp7bDrGOan0c8IdNZqPYVMkARud6TPgh8dh8/kFNfFn0YIWxTyKkz3J4mcuB 4onL4ilzGxFJfUu6SL6kbdoaR5HDa1dziQj26AxztmAmHL/6wtSbeFU7mDjorC0pKnWA voCPnMn77LH0SJ6O4j1kP+0k2rJKdjMxzESi4gyLu9lnNCv3IMDaDsu39KVfAa94IpO7 tjmuGsSku6BfGGspoYfhmkSjooXDy+dxTSBgL7iSo9chlMysKuIGw/TsDKIocQciun5C A/7A== X-Forwarded-Encrypted: i=1; AJvYcCX+oXlAuW+g+Rk/nOiRsKeMt3+cYnmhmVHFEnTHJoL5vk5xPoV9fWsHbQQJjzKEpIKA7m/Aeys5ro6i/nE=@vger.kernel.org X-Gm-Message-State: AOJu0YwgqFAf+VtrvLbmik6S37QUbmWVQMhpEQ3sKK+2gd7ohh99wk3I IxQf/ejwn4HBQY8n/F5rs+E0qhVJwuXpWbNayAVr0KH95C5Q/WrRBcHb/eAGOUtzPkO91x8Vlb3 32vYnJC4IVKlsSS+6sw1IyVVsv2CNLlb62N0hSSNr/j/v0wdM4sye0x23gKXzjQ== X-Received: by 2002:adf:fa51:0:b0:37c:cc96:d1ce with SMTP id ffacd0b85a97d-37efcf1f8a1mr6808543f8f.24.1729868452213; Fri, 25 Oct 2024 08:00:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEa7Kz6+PrKx8KcDC+E98x5hc+UgRFrJFo2Tc4bVFvRSnBAJrHJ7dhWBhof8LHoIINcGd/8TA== X-Received: by 2002:adf:fa51:0:b0:37c:cc96:d1ce with SMTP id ffacd0b85a97d-37efcf1f8a1mr6808341f8f.24.1729868450198; Fri, 25 Oct 2024 08:00:50 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:49 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 08/10] serial: rp2: Replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:51 +0200 Message-ID: <20241025145959.185373-9-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Jiri Slaby --- drivers/tty/serial/rp2.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/rp2.c b/drivers/tty/serial/rp2.c index 8bab2aedc499..6d99a02dd439 100644 --- a/drivers/tty/serial/rp2.c +++ b/drivers/tty/serial/rp2.c @@ -698,7 +698,6 @@ static int rp2_probe(struct pci_dev *pdev, const struct firmware *fw; struct rp2_card *card; struct rp2_uart_port *ports; - void __iomem * const *bars; int rc; card = devm_kzalloc(&pdev->dev, sizeof(*card), GFP_KERNEL); @@ -711,13 +710,16 @@ static int rp2_probe(struct pci_dev *pdev, if (rc) return rc; - rc = pcim_iomap_regions_request_all(pdev, 0x03, DRV_NAME); + rc = pcim_request_all_regions(pdev, DRV_NAME); if (rc) return rc; - bars = pcim_iomap_table(pdev); - card->bar0 = bars[0]; - card->bar1 = bars[1]; + card->bar0 = pcim_iomap(pdev, 0, 0); + if (!card->bar0) + return -ENOMEM; + card->bar1 = pcim_iomap(pdev, 1, 0); + if (!card->bar1) + return -ENOMEM; card->pdev = pdev; rp2_decode_cap(id, &card->n_ports, &card->smpte);