diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-06-02 23:36:11 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-06-08 21:32:40 -0400 |
commit | 420b5eeaee5b877829c4f0a514a5ad21448596af (patch) | |
tree | 7d0f7e805f4b3cbb0a70a73ee181ad1f89a9a574 /arch/powerpc | |
parent | 0be234a46596cd19eb56d2cf46836de8221afb6b (diff) |
[POWERPC] Use dev_set_name in pci_64.c
During the next merge window, pci_name()'s return value will become
const, so use the new dev_set_name() instead to avoid the warning (from
linux-next):
arch/powerpc/kernel/pci_64.c: In function 'of_create_pci_dev':
arch/powerpc/kernel/pci_64.c:193: warning: passing argument 1 of 'sprintf' discards qualifiers from pointer target type
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 52750745edfd..30eedfc5a566 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -189,7 +189,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, | |||
189 | 189 | ||
190 | dev->cfg_size = pci_cfg_space_size(dev); | 190 | dev->cfg_size = pci_cfg_space_size(dev); |
191 | 191 | ||
192 | sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), | 192 | dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus), |
193 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | 193 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); |
194 | dev->class = get_int_prop(node, "class-code", 0); | 194 | dev->class = get_int_prop(node, "class-code", 0); |
195 | dev->revision = get_int_prop(node, "revision-id", 0); | 195 | dev->revision = get_int_prop(node, "revision-id", 0); |