From patchwork Thu Apr 18 09:00:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gu Zheng X-Patchwork-Id: 2458041 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B113DDF2E5 for ; Thu, 18 Apr 2013 09:15:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756072Ab3DRJPk (ORCPT ); Thu, 18 Apr 2013 05:15:40 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:11918 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1756041Ab3DRJPj (ORCPT ); Thu, 18 Apr 2013 05:15:39 -0400 X-IronPort-AV: E=Sophos;i="4.87,500,1363104000"; d="scan'208,223";a="7086365" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 18 Apr 2013 17:12:57 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r3I9FYoT018090; Thu, 18 Apr 2013 17:15:37 +0800 Received: from [10.167.233.218] ([10.167.233.218]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013041817010805-653321 ; Thu, 18 Apr 2013 17:01:08 +0800 Message-ID: <516FB647.5030203@cn.fujitsu.com> Date: Thu, 18 Apr 2013 17:00:55 +0800 From: Gu Zheng User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: linux-pci@vger.kernel.org CC: Bjorn Helgaas , Yasuaki Ishimatsu , Taku Izumi , Yinghai Lu , Jiang Liu , tangchen , "'Lin Feng'" , li guang Subject: [PATCH 2/3] PCI: rename alloc_pci_dev() to pci_alloc_dev() X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/04/18 17:01:08, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/04/18 17:14:13, Serialize complete at 2013/04/18 17:14:13 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From a3135f4a814ec2faba007f030ca96ea2297484ef Mon Sep 17 00:00:00 2001 From: Gu Zheng Date: Thu, 18 Apr 2013 17:27:40 +0900 Subject: [PATCH 2/3] PCI: rename alloc_pci_dev() to pci_alloc_dev() Rename alloc_pci_dev() to pci_alloc_dev() to make the name style the same as pci_alloc_bus(), pci_destroy_dev(). Signed-off-by: Gu Zheng Reviewed-by: Li Guang --- arch/powerpc/kernel/pci_of_scan.c | 2 +- drivers/char/agp/alpha-agp.c | 2 +- drivers/char/agp/parisc-agp.c | 2 +- drivers/pci/iov.c | 2 +- drivers/pci/probe.c | 6 +++--- drivers/scsi/megaraid.c | 2 +- include/linux/pci.h | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c index 9e0f6fd..2e35d11 100644 --- a/arch/powerpc/kernel/pci_of_scan.c +++ b/arch/powerpc/kernel/pci_of_scan.c @@ -128,7 +128,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, const char *type; struct pci_slot *slot; - dev = alloc_pci_dev(); + dev = pci_alloc_dev(); if (!dev) return NULL; type = of_get_property(node, "device_type", NULL); diff --git a/drivers/char/agp/alpha-agp.c b/drivers/char/agp/alpha-agp.c index dd84af4..aad2756 100644 --- a/drivers/char/agp/alpha-agp.c +++ b/drivers/char/agp/alpha-agp.c @@ -174,7 +174,7 @@ alpha_core_agp_setup(void) /* * Build a fake pci_dev struct */ - pdev = alloc_pci_dev(); + pdev = pci_alloc_dev(); if (!pdev) return -ENOMEM; pdev->vendor = 0xffff; diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c index 94821ab..1dd1914 100644 --- a/drivers/char/agp/parisc-agp.c +++ b/drivers/char/agp/parisc-agp.c @@ -333,7 +333,7 @@ parisc_agp_setup(void __iomem *ioc_hpa, void __iomem *lba_hpa) struct agp_bridge_data *bridge; int error = 0; - fake_bridge_dev = alloc_pci_dev(); + fake_bridge_dev = pci_alloc_dev(); if (!fake_bridge_dev) { error = -ENOMEM; goto fail; diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 18798a7..4a15274 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -77,7 +77,7 @@ static int virtfn_add(struct pci_dev *dev, int id, int reset) struct resource *res; struct pci_sriov *iov = dev->sriov; - virtfn = alloc_pci_dev(); + virtfn = pci_alloc_dev(); if (!virtfn) return -ENOMEM; diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 44a6f7d..44f29d3 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1199,7 +1199,7 @@ static void pci_release_bus_bridge_dev(struct device *dev) kfree(bridge); } -struct pci_dev *alloc_pci_dev(void) +struct pci_dev *pci_alloc_dev(void) { struct pci_dev *dev; @@ -1211,7 +1211,7 @@ struct pci_dev *alloc_pci_dev(void) return dev; } -EXPORT_SYMBOL(alloc_pci_dev); +EXPORT_SYMBOL(pci_alloc_dev); bool pci_bus_read_dev_vendor_id(struct pci_bus *bus, int devfn, u32 *l, int crs_timeout) @@ -1261,7 +1261,7 @@ static struct pci_dev *pci_scan_device(struct pci_bus *bus, int devfn) if (!pci_bus_read_dev_vendor_id(bus, devfn, &l, 60*1000)) return NULL; - dev = alloc_pci_dev(); + dev = pci_alloc_dev(); if (!dev) return NULL; diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 9504ec0..de2e61f 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -2025,7 +2025,7 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor) static inline int make_local_pdev(adapter_t *adapter, struct pci_dev **pdev) { - *pdev = alloc_pci_dev(); + *pdev = pci_alloc_dev(); if( *pdev == NULL ) return -1; diff --git a/include/linux/pci.h b/include/linux/pci.h index c4d064d..67edd5a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -348,7 +348,7 @@ static inline struct pci_dev *pci_physfn(struct pci_dev *dev) return dev; } -extern struct pci_dev *alloc_pci_dev(void); +extern struct pci_dev *pci_alloc_dev(void); #define to_pci_dev(n) container_of(n, struct pci_dev, dev) #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)