Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758721AbYGBPyg (ORCPT ); Wed, 2 Jul 2008 11:54:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754494AbYGBPxv (ORCPT ); Wed, 2 Jul 2008 11:53:51 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:50983 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754389AbYGBPxu (ORCPT ); Wed, 2 Jul 2008 11:53:50 -0400 Date: Wed, 2 Jul 2008 08:35:24 -0700 From: Greg Kroah-Hartman To: Jesse Barnes Cc: Kay Sievers , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, davem@davemloft.net Subject: [PATCH] PCI: make pci_name use dev_name Message-ID: <20080702153524.GA30318@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1494 Lines: 46 From: Greg Kroah-Hartman Also fixes up the sparc PCI code that was assuming this is not a constant. This is done in anticipation of removing the bus_id field from struct driver. Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman --- arch/sparc64/kernel/pci.c | 2 +- include/linux/pci.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c @@ -408,7 +408,7 @@ struct pci_dev *of_create_pci_dev(struct dev->class = class >> 8; dev->revision = class & 0xff; - sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), + sprintf(dev->dev.bus_id, "%04x:%02x:%02x.%d", pci_domain_nr(bus), dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); if (ofpci_verbose) --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -977,9 +977,9 @@ static inline void pci_set_drvdata(struc /* If you want to know what to call your pci_dev, ask this function. * Again, it's a wrapper around the generic device. */ -static inline char *pci_name(struct pci_dev *pdev) +static inline const char *pci_name(struct pci_dev *pdev) { - return pdev->dev.bus_id; + return dev_name(&pdev->dev); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/