From patchwork Mon Feb 15 18:15:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 1440681 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=js6qKmr0; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4DfXPV1mjGz9sSC for ; Tue, 16 Feb 2021 05:17:02 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230450AbhBOSQb (ORCPT ); Mon, 15 Feb 2021 13:16:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230467AbhBOSQO (ORCPT ); Mon, 15 Feb 2021 13:16:14 -0500 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50DECC061574; Mon, 15 Feb 2021 10:15:58 -0800 (PST) Received: by mail-pg1-x532.google.com with SMTP id o38so4651047pgm.9; Mon, 15 Feb 2021 10:15:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NWxmyj7Bp5pN/aMN4QfyoKCmw5EEMRBvUVT5cqlYd+I=; b=js6qKmr0DTmFPRdODmv5PsTpD17vhd0Cou4+q9nPUOS+/w3/vpzYalMzk0sFpqJO/n LTLPmu6XdlAoDjwNT7+WauXcbOVeuxcBczfuKn011MKhxJumr1PvWQJ1NkOMXIpX9PwI +2Zq/lMyAtUWT1Zr5bzbW7VT5rzY+SdZf63pjh0vFRplg75yo1eX8d6YGg3HmUHyeL0g Em9Qj1v9hUfUkHladIypOvoEM9TGJXA794IQuJ0UUnjtxabWBq3f61egr80SabAzpqAw 7m+M/UYxtBKU/bWqQTyhTZVX5JygZKqDsg9qcz2SkSZ26UwQVNQxSd+PdOCau8F4ZGrN FUTA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=NWxmyj7Bp5pN/aMN4QfyoKCmw5EEMRBvUVT5cqlYd+I=; b=a5tHS2bS4c55SiVh/5DPJH4yhXEfEk3R/SpHLicUI5JoI5BuXJsSm2oWMkADevQ8G1 PYSD2CJ+xlcTLfAl4c+FxGO0A295rMkUDjWQQlZOOv/he+fjkQZglDLrknM/E85tVWB6 XmiOOUG6X9529jZ/jPxBXywLmXRkSzGEhqEWUX+x21EWbLo5yWs5RmMH73zlIgXgbPTh uIgIh8/7qD4V5Z/HG2zPmhA9d5BisXbTz2TeeOM7J8E1+2F/ilaDbd3ypFAtexsCfEhZ fA7YJg+LG42vEx64BCNM56aHchf3iyobM1IjpAsFdlSdzI9Ti3oALmCWiuMcMuMZ0Du5 wWsQ== X-Gm-Message-State: AOAM531TG1GrRhLZVKUn2zElmJ/E8h9RkZsInKpQSxIY7A+F1ldbigDd fnpgVhuxxY5uTg2UNZLE6hc= X-Google-Smtp-Source: ABdhPJx25nMxKuNSa5VtGFgNGMfvjiwD6lDEpI4+RHvbnmAbV16UsBWcFKpIBE+QWWSqvTlM4eULGw== X-Received: by 2002:a62:6304:0:b029:1c0:d62d:d213 with SMTP id x4-20020a6263040000b02901c0d62dd213mr16203137pfb.79.1613412957932; Mon, 15 Feb 2021 10:15:57 -0800 (PST) Received: from localhost (185.212.56.4.16clouds.com. [185.212.56.4]) by smtp.gmail.com with ESMTPSA id z2sm19202572pfj.100.2021.02.15.10.15.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 10:15:57 -0800 (PST) From: Dejin Zheng To: corbet@lwn.net, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, rric@kernel.org, bhelgaas@google.com, wsa@kernel.org, linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v1 1/4] PCI: Introduce pcim_alloc_irq_vectors() Date: Tue, 16 Feb 2021 02:15:47 +0800 Message-Id: <20210215181550.714101-2-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20210215181550.714101-1-zhengdejin5@gmail.com> References: <20210215181550.714101-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Introduce pcim_alloc_irq_vectors(), a explicit device-managed version of pci_alloc_irq_vectors(). Suggested-by: Andy Shevchenko Signed-off-by: Dejin Zheng --- drivers/pci/pci.c | 19 +++++++++++++++++++ include/linux/pci.h | 3 +++ 2 files changed, 22 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index b67c4327d307..33244b512057 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2054,6 +2054,25 @@ void pcim_pin_device(struct pci_dev *pdev) } EXPORT_SYMBOL(pcim_pin_device); +/** + * pcim_alloc_irq_vectors - a device-managed pci_alloc_irq_vectors() + * + * It depends on calling pcim_enable_device() to make irq resources manageable. + */ +int pcim_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs, + unsigned int max_vecs, unsigned int flags) +{ + struct pci_devres *dr; + + /*Ensure that the pcim_enable_device() function has been called*/ + dr = find_pci_dr(dev); + if (!dr || !dr->enabled) + return -EINVAL; + + return pci_alloc_irq_vectors(dev, min_vecs, max_vecs, flags); +} +EXPORT_SYMBOL(pcim_alloc_irq_vectors); + /* * pcibios_add_device - provide arch specific hooks when adding device dev * @dev: the PCI device being added diff --git a/include/linux/pci.h b/include/linux/pci.h index 86c799c97b77..d75ba85ddfc5 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1818,6 +1818,9 @@ pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs, NULL); } +int pcim_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs, + unsigned int max_vecs, unsigned int flags); + /* Include architecture-dependent settings and functions */ #include From patchwork Mon Feb 15 18:15:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 1440684 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=bN439IQR; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4DfXPW3PHfz9sVX for ; Tue, 16 Feb 2021 05:17:03 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230283AbhBOSQu (ORCPT ); Mon, 15 Feb 2021 13:16:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229981AbhBOSQl (ORCPT ); Mon, 15 Feb 2021 13:16:41 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A5A1C061786; Mon, 15 Feb 2021 10:16:01 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id r2so4140668plr.10; Mon, 15 Feb 2021 10:16:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xnoNnH/L5zEhIq0sRCrgcPMdMrANs5dA+JonFJyOPWc=; b=bN439IQRSSDlB/CC8oaNMTMXXCkdXfoAN719XvCeWMnuOrA82iceLWIZfAMvaCT3aO eg/p8OCtjphR3iCfeIsDW+VbksC9uGFD/KP/vzuGRImZs2PtudKRB7eyktugirfJ5ThB +juzPBRSuGP2izRy39ZAjk87xdHtBGKesNmkdnyn3lRrhHIFbJ9QkWtGqBIZbf0nh5Uc 4Hjmkx6C969+XHaQsMBKTgfZNFZCrRhxoxrc/GSp/VpHm6Wv6GCcU5D00JKYfVHOJgro mzny/h2p5U1waMns5zJd5e/iW8i2bByhFsnq2o+3XjyNbyNhCcavB3dADzQfu/uJ9lQl b+eQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=xnoNnH/L5zEhIq0sRCrgcPMdMrANs5dA+JonFJyOPWc=; b=oOfF9W1B9wuXPUlz58P7Un7hNzdzQwmO86JNHnMuhMAC3KHL2Sb5bVnN3rNol3OiPA hacYyZfaiJ69DUcKQNSGrqbRHyXE/jLQcVcLx77r/8i9FUm29iEVyORbgTZkU5Jozaa5 Ogu0nHjb5ublV8NxsbWdowEqvE/hMvyimaZ7PB1wVEkwL26KGaSY+VVXk9W6JGPvDVmZ yd3hepOJQE7jAjbGzfB6mEwERFZJfKD44lwjyGUrwDZgAYYvXHNrN0Zs/EsAG5mNhgd0 3kbuN+X4tSgojHYiPxOefhvBGjM2yJUXMjfxS6Q3NX9QzA9IImCPIry2sRkyUHw2eO0C 1ngQ== X-Gm-Message-State: AOAM531FragFqHvxnbnl1rTPCuNgTvzea2XDX0hDIICAWcJlpQ1RZeaI 6pPD1gydSZKS5jxkewrTw+w= X-Google-Smtp-Source: ABdhPJzGiveTCd8I2UolTZNrcatXgCf2F4QAR1DDljOVbXxY0xonT2eylGgvjkUiR7rtJ7/xpi0/Dw== X-Received: by 2002:a17:90a:fb87:: with SMTP id cp7mr107499pjb.121.1613412960670; Mon, 15 Feb 2021 10:16:00 -0800 (PST) Received: from localhost (185.212.56.4.16clouds.com. [185.212.56.4]) by smtp.gmail.com with ESMTPSA id m81sm19262472pfd.188.2021.02.15.10.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 10:16:00 -0800 (PST) From: Dejin Zheng To: corbet@lwn.net, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, rric@kernel.org, bhelgaas@google.com, wsa@kernel.org, linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v1 2/4] Documentation: devres: add pcim_alloc_irq_vectors() Date: Tue, 16 Feb 2021 02:15:48 +0800 Message-Id: <20210215181550.714101-3-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20210215181550.714101-1-zhengdejin5@gmail.com> References: <20210215181550.714101-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org add pcim_alloc_irq_vectors(), a explicit device-managed version of pci_alloc_irq_vectors(). Signed-off-by: Dejin Zheng --- Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst index cd8b6e657b94..cd53106fbf5e 100644 --- a/Documentation/driver-api/driver-model/devres.rst +++ b/Documentation/driver-api/driver-model/devres.rst @@ -380,6 +380,7 @@ PCI devm_pci_alloc_host_bridge() : managed PCI host bridge allocation devm_pci_remap_cfgspace() : ioremap PCI configuration space devm_pci_remap_cfg_resource() : ioremap PCI configuration space resource + pcim_alloc_irq_vectors() : managed irq vectors allocation pcim_enable_device() : after success, all PCI ops become managed pcim_pin_device() : keep PCI device enabled after release From patchwork Mon Feb 15 18:15:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 1440686 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Q/5tsoHe; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4DfXPX4216z9sVn for ; Tue, 16 Feb 2021 05:17:04 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231169AbhBOSQy (ORCPT ); Mon, 15 Feb 2021 13:16:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231133AbhBOSQn (ORCPT ); Mon, 15 Feb 2021 13:16:43 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87E16C061788; Mon, 15 Feb 2021 10:16:03 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id e9so4159914plh.3; Mon, 15 Feb 2021 10:16:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FKIHzO/8B5H0T3re/yrCOXEbpu1BJ6SeawfxnwopbDE=; b=Q/5tsoHe7laL24wXukVg050qxzUghUWnvE5Ib1LvShit+TQ9xHtVKJhldBwQenZa4f Lbs8Zcs4GsPyaUGOcemHvX0pxg5tauH6oi7qjiSB1KJgZH7Rl/oyU/QNK/fg/MgxrFcB qRNo3G54aIaagfwJlyfuVys9/omRmp5o2vFEqIFeDemQ7M52FLTAG0XMyopwfrJcf7Li KSGEE4pUazBP1BuUAqDkGFlB7arYfWaGatmr+m9wVnS3z9Atanlu1jH9PkZP80PqCdSX VoNPQcoDfy7Oq/u9BAmyqftcXBtJvz9DFgLrTHBwcw+eJBBn15pLme7+pu+U8EfYsrjU v53A== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=FKIHzO/8B5H0T3re/yrCOXEbpu1BJ6SeawfxnwopbDE=; b=IbQzJESqvlPEL9/7uQmJ2709c0D3DF7luA+npppORDAYBDR4OoNnabBQ60VR34oaJ2 Y02PKxct4eLDl573kcb8ij+YXc3L7dxE6SdnJOvgQVjno1P3w9H6VRDmwUHAUf8R4IK4 5SnqHGzr21ABDQgzUVJtN03JDnvggszAV62wcAMtWsR/bC+1p4P2nTsRy5AMQPdtEvzi Py7pS8UCiLhLhmxMUqwzmdxcM3coQfqghzRIKCZKfbNSsbF4AxgAaJBNsKhKR1Y+7WGJ 4zT74Diu6tj77QLyzxBGrK07LC2sE2mFR6qo00SyQIbqxsLnoPkaq+2tsbZ0saF/9hht dW7g== X-Gm-Message-State: AOAM532Z9IMqD51LRa6+FPN7txLDIgXd+Ywfk6QwbGTmh/SuEt2vB2BL 49XNxDMjmqs4U69if+vXHe4= X-Google-Smtp-Source: ABdhPJy6BJ0QsWiXQq8mexMLqf2qWqJ3BOYbKkPjyzuL6uyCx2qW+uzSerzg7jIIqtH7ifu5gms4iQ== X-Received: by 2002:a17:90a:fb87:: with SMTP id cp7mr137371pjb.162.1613412963172; Mon, 15 Feb 2021 10:16:03 -0800 (PST) Received: from localhost (185.212.56.4.16clouds.com. [185.212.56.4]) by smtp.gmail.com with ESMTPSA id s19sm19981330pfc.79.2021.02.15.10.16.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 10:16:02 -0800 (PST) From: Dejin Zheng To: corbet@lwn.net, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, rric@kernel.org, bhelgaas@google.com, wsa@kernel.org, linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v1 3/4] i2c: designware: Use the correct name of device-managed function Date: Tue, 16 Feb 2021 02:15:49 +0800 Message-Id: <20210215181550.714101-4-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20210215181550.714101-1-zhengdejin5@gmail.com> References: <20210215181550.714101-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Use the correct name of device-managed function to alloc irq vectors, the pcim_alloc_irq_vectors() function, a explicit device-managed version of pci_alloc_irq_vectors(). Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-designware-pcidrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index 55c83a7a24f3..444533be49ee 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -219,7 +219,7 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, if (!dev) return -ENOMEM; - r = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES); + r = pcim_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES); if (r < 0) return r; From patchwork Mon Feb 15 18:15:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dejin Zheng X-Patchwork-Id: 1440689 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=HCBWxifa; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4DfXR63DHtz9sVF for ; Tue, 16 Feb 2021 05:18:26 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230507AbhBOSR7 (ORCPT ); Mon, 15 Feb 2021 13:17:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231136AbhBOSQq (ORCPT ); Mon, 15 Feb 2021 13:16:46 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E90EC06178A; Mon, 15 Feb 2021 10:16:06 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id y25so1358017pfp.5; Mon, 15 Feb 2021 10:16:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3CVx8x/uzNXn30+T+KgGNTCM/AO8INlKriF8saOOxcg=; b=HCBWxifauE/9Zl4Zp+5V+6mOAK8I1ldnH++yA+EReSYPCVgtOEt7MXSn0aP5IZ6lez D14G0jPE2LPHmaoRdrhLmbCelXlAczf81A0Zbh42O6r6qkYmAgAsUcMRYQcxbhqZiPFL RkzSoNCAHGWpba2SHHWsyKpaQhBHJVTQiBr0XxFCJJs/mPC85LiqE0AX8fZxBFPalcgK 3HEw0IhMFY/tKK03E7eQ3t18SpPh3T5ZH9l3b29a7eyRfhLBu+0EIV3eKQGDBcTFsdD9 vbpzDGeJTS/SMJ03UVP8l+pUE9F6Y6WS9+PR4Z/m6I6hFH4iUCiNDBeguF9gfZ7EhuIC W6Gw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=3CVx8x/uzNXn30+T+KgGNTCM/AO8INlKriF8saOOxcg=; b=qXjSINtdhsB/jxy1eBD2w/aUKwUfBuVVOyuefE5rD2D8H3SJBapyTRaKuIJ0lq9wML Yu09cA39tEVNjm1frp8hgYYMPf5HE2ep6o2AzLNqPJG9rvL/qUXqSPWMXupnV+H14vZP B9IZ8EJJ9BQXZyNDDgRl0rfK17CNle+ehNBItUifk6FDjISEwdcZnKjUykzIvmBPtLlZ Z0MLh+bXCPsrvH8Koom4Nd1fpZLQR4N1EhhG5hJV3P9U+6q1xYeVYH2xF8ggSetYQRJG qWvbSXnlRqxlsk9mn4ZBBIrO5rsPcgUrXf2k67BY1Cpx8Z7LFm7Nrv9klO0NV0AO8epV MWTw== X-Gm-Message-State: AOAM531gPQ11qfAId6jWNnHluUDa2AgID5ebE6kKVpDZ9eeVEL6MJzmD gN4uyB+LmjXA/qnD7U8aeMA= X-Google-Smtp-Source: ABdhPJyNMTWJRSo/PojxXb8pkipT50qqBBezSslnxnxbGJvdpWQblCasRD3SE+VwAgU0990i2ApHwA== X-Received: by 2002:a05:6a00:2ac:b029:1e9:3cb7:324a with SMTP id q12-20020a056a0002acb02901e93cb7324amr15470130pfs.36.1613412966047; Mon, 15 Feb 2021 10:16:06 -0800 (PST) Received: from localhost (185.212.56.4.16clouds.com. [185.212.56.4]) by smtp.gmail.com with ESMTPSA id g65sm19039593pfb.20.2021.02.15.10.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 10:16:05 -0800 (PST) From: Dejin Zheng To: corbet@lwn.net, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com, rric@kernel.org, bhelgaas@google.com, wsa@kernel.org, linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v1 4/4] i2c: thunderx: Use the correct name of device-managed function Date: Tue, 16 Feb 2021 02:15:50 +0800 Message-Id: <20210215181550.714101-5-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20210215181550.714101-1-zhengdejin5@gmail.com> References: <20210215181550.714101-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Use the correct name of device-managed function to alloc irq vectors, the pcim_alloc_irq_vectors() function, a explicit device-managed version of pci_alloc_irq_vectors(). Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-thunderx-pcidrv.c b/drivers/i2c/busses/i2c-thunderx-pcidrv.c index 12c90aa0900e..63354e9fb726 100644 --- a/drivers/i2c/busses/i2c-thunderx-pcidrv.c +++ b/drivers/i2c/busses/i2c-thunderx-pcidrv.c @@ -192,7 +192,7 @@ static int thunder_i2c_probe_pci(struct pci_dev *pdev, i2c->hlc_int_enable = thunder_i2c_hlc_int_enable; i2c->hlc_int_disable = thunder_i2c_hlc_int_disable; - ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSIX); + ret = pcim_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSIX); if (ret < 0) goto error;