Skip to content

Commit

Permalink
PCI: handle pci_name() being const
Browse files Browse the repository at this point in the history
This changes pci_setup_device to handle pci_name() now returning a
constant string.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Greg Kroah-Hartman authored and Jesse Barnes committed Jul 3, 2008
1 parent 80be038 commit eebfcfb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,9 +713,9 @@ static int pci_setup_device(struct pci_dev * dev)
{
u32 class;

snprintf(dev->dev.bus_id, BUS_ID_SIZE,
"%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;
Expand Down

0 comments on commit eebfcfb

Please sign in to comment.