lkml.org 
[lkml]   [2008]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 02/04] PCI: handle pci_name() being const
Date
On Wednesday, July 02, 2008 1:24 pm Greg Kroah-Hartman wrote:
> This changes pci_setup_device to handle pci_name() now returning a
> constant string.
>
> Cc: Jesse Barns <jbarnes@virtuousgeek.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> ---
> drivers/pci/probe.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -711,8 +711,9 @@ static int pci_setup_device(struct pci_d
> {
> u32 class;
>
> - sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(dev->bus),
> - dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
> + dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(dev->bus),
> + dev->bus->number, PCI_SLOT(dev->devfn),
> + PCI_FUNC(dev->devfn));
>
> pci_read_config_dword(dev, PCI_CLASS_REVISION, &class);
> dev->revision = class & 0xff;

Just applied this to my linux-next branch (fortunately I already had the
dev_set_name commit). Doing a quick build & test before I push it out.

Thanks,
Jesse


\
 
 \ /
  Last update: 2008-07-03 21:37    [W:0.092 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site