diff options
Diffstat (limited to 'drivers/pnp/core.c')
-rw-r--r-- | drivers/pnp/core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c index 16c01c6fa7c5..14814f231739 100644 --- a/drivers/pnp/core.c +++ b/drivers/pnp/core.c | |||
@@ -70,7 +70,7 @@ int pnp_register_protocol(struct pnp_protocol *protocol) | |||
70 | spin_unlock(&pnp_lock); | 70 | spin_unlock(&pnp_lock); |
71 | 71 | ||
72 | protocol->number = nodenum; | 72 | protocol->number = nodenum; |
73 | sprintf(protocol->dev.bus_id, "pnp%d", nodenum); | 73 | dev_set_name(&protocol->dev, "pnp%d", nodenum); |
74 | return device_register(&protocol->dev); | 74 | return device_register(&protocol->dev); |
75 | } | 75 | } |
76 | 76 | ||
@@ -145,8 +145,7 @@ struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id, char *pnpid | |||
145 | dev->dev.coherent_dma_mask = dev->dma_mask; | 145 | dev->dev.coherent_dma_mask = dev->dma_mask; |
146 | dev->dev.release = &pnp_release_device; | 146 | dev->dev.release = &pnp_release_device; |
147 | 147 | ||
148 | sprintf(dev->dev.bus_id, "%02x:%02x", dev->protocol->number, | 148 | dev_set_name(&dev->dev, "%02x:%02x", dev->protocol->number, dev->number); |
149 | dev->number); | ||
150 | 149 | ||
151 | dev_id = pnp_add_id(dev, pnpid); | 150 | dev_id = pnp_add_id(dev, pnpid); |
152 | if (!dev_id) { | 151 | if (!dev_id) { |