diff options
Diffstat (limited to 'drivers/pnp')
-rw-r--r-- | drivers/pnp/card.c | 7 | ||||
-rw-r--r-- | drivers/pnp/core.c | 5 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 1 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/bioscalls.c | 2 | ||||
-rw-r--r-- | drivers/pnp/system.c | 2 |
5 files changed, 7 insertions, 10 deletions
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c index e75b060daa9..efea128f02d 100644 --- a/drivers/pnp/card.c +++ b/drivers/pnp/card.c @@ -165,8 +165,7 @@ struct pnp_card *pnp_alloc_card(struct pnp_protocol *protocol, int id, char *pnp card->number = id; card->dev.parent = &card->protocol->dev; - sprintf(card->dev.bus_id, "%02x:%02x", card->protocol->number, - card->number); + dev_set_name(&card->dev, "%02x:%02x", card->protocol->number, card->number); card->dev.coherent_dma_mask = DMA_24BIT_MASK; card->dev.dma_mask = &card->dev.coherent_dma_mask; @@ -295,8 +294,8 @@ int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev) { dev->dev.parent = &card->dev; dev->card_link = NULL; - snprintf(dev->dev.bus_id, BUS_ID_SIZE, "%02x:%02x.%02x", - dev->protocol->number, card->number, dev->number); + dev_set_name(&dev->dev, "%02x:%02x.%02x", + dev->protocol->number, card->number, dev->number); spin_lock(&pnp_lock); dev->card = card; list_add_tail(&dev->card_list, &card->devices); diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c index 16c01c6fa7c..14814f23173 100644 --- a/drivers/pnp/core.c +++ b/drivers/pnp/core.c @@ -70,7 +70,7 @@ int pnp_register_protocol(struct pnp_protocol *protocol) spin_unlock(&pnp_lock); protocol->number = nodenum; - sprintf(protocol->dev.bus_id, "pnp%d", nodenum); + dev_set_name(&protocol->dev, "pnp%d", nodenum); return device_register(&protocol->dev); } @@ -145,8 +145,7 @@ struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id, char *pnpid dev->dev.coherent_dma_mask = dev->dma_mask; dev->dev.release = &pnp_release_device; - sprintf(dev->dev.bus_id, "%02x:%02x", dev->protocol->number, - dev->number); + dev_set_name(&dev->dev, "%02x:%02x", dev->protocol->number, dev->number); dev_id = pnp_add_id(dev, pnpid); if (!dev_id) { diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 383e47c392a..2834846a185 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c @@ -23,7 +23,6 @@ #include <linux/pnp.h> #include <linux/mod_devicetable.h> #include <acpi/acpi_bus.h> -#include <acpi/actypes.h> #include "../base.h" #include "pnpacpi.h" diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c index 7ff824496b3..7e6b5a3b328 100644 --- a/drivers/pnp/pnpbios/bioscalls.c +++ b/drivers/pnp/pnpbios/bioscalls.c @@ -481,7 +481,7 @@ void pnpbios_calls_init(union pnp_bios_install_struct *header) set_base(bad_bios_desc, __va((unsigned long)0x40 << 4)); _set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4)); - for (i = 0; i < NR_CPUS; i++) { + for_each_possible_cpu(i) { struct desc_struct *gdt = get_cpu_gdt_table(i); if (!gdt) continue; diff --git a/drivers/pnp/system.c b/drivers/pnp/system.c index 764f3a31068..59b90922da8 100644 --- a/drivers/pnp/system.c +++ b/drivers/pnp/system.c @@ -26,7 +26,7 @@ static void reserve_range(struct pnp_dev *dev, resource_size_t start, resource_size_t end, int port) { char *regionid; - const char *pnpid = dev->dev.bus_id; + const char *pnpid = dev_name(&dev->dev); struct resource *res; regionid = kmalloc(16, GFP_KERNEL); |