diff options
Diffstat (limited to 'drivers/macintosh/macio_asic.c')
-rw-r--r-- | drivers/macintosh/macio_asic.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index ec9e5f32f0ae..6e149f4a1fff 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | #undef DEBUG | 34 | #undef DEBUG |
35 | 35 | ||
36 | #define MAX_NODE_NAME_SIZE (BUS_ID_SIZE - 12) | 36 | #define MAX_NODE_NAME_SIZE (20 - 12) |
37 | 37 | ||
38 | static struct macio_chip *macio_on_hold; | 38 | static struct macio_chip *macio_on_hold; |
39 | 39 | ||
@@ -240,7 +240,7 @@ static void macio_create_fixup_irq(struct macio_dev *dev, int index, | |||
240 | if (irq != NO_IRQ) { | 240 | if (irq != NO_IRQ) { |
241 | dev->interrupt[index].start = irq; | 241 | dev->interrupt[index].start = irq; |
242 | dev->interrupt[index].flags = IORESOURCE_IRQ; | 242 | dev->interrupt[index].flags = IORESOURCE_IRQ; |
243 | dev->interrupt[index].name = dev->ofdev.dev.bus_id; | 243 | dev->interrupt[index].name = dev_name(&dev->ofdev.dev); |
244 | } | 244 | } |
245 | if (dev->n_interrupts <= index) | 245 | if (dev->n_interrupts <= index) |
246 | dev->n_interrupts = index + 1; | 246 | dev->n_interrupts = index + 1; |
@@ -303,7 +303,7 @@ static void macio_setup_interrupts(struct macio_dev *dev) | |||
303 | break; | 303 | break; |
304 | res->start = irq; | 304 | res->start = irq; |
305 | res->flags = IORESOURCE_IRQ; | 305 | res->flags = IORESOURCE_IRQ; |
306 | res->name = dev->ofdev.dev.bus_id; | 306 | res->name = dev_name(&dev->ofdev.dev); |
307 | if (macio_resource_quirks(np, res, i - 1)) { | 307 | if (macio_resource_quirks(np, res, i - 1)) { |
308 | memset(res, 0, sizeof(struct resource)); | 308 | memset(res, 0, sizeof(struct resource)); |
309 | continue; | 309 | continue; |
@@ -325,7 +325,7 @@ static void macio_setup_resources(struct macio_dev *dev, | |||
325 | if (index >= MACIO_DEV_COUNT_RESOURCES) | 325 | if (index >= MACIO_DEV_COUNT_RESOURCES) |
326 | break; | 326 | break; |
327 | *res = r; | 327 | *res = r; |
328 | res->name = dev->ofdev.dev.bus_id; | 328 | res->name = dev_name(&dev->ofdev.dev); |
329 | 329 | ||
330 | if (macio_resource_quirks(np, res, index)) { | 330 | if (macio_resource_quirks(np, res, index)) { |
331 | memset(res, 0, sizeof(struct resource)); | 331 | memset(res, 0, sizeof(struct resource)); |
@@ -338,7 +338,7 @@ static void macio_setup_resources(struct macio_dev *dev, | |||
338 | if (insert_resource(parent_res, res)) { | 338 | if (insert_resource(parent_res, res)) { |
339 | printk(KERN_WARNING "Can't request resource " | 339 | printk(KERN_WARNING "Can't request resource " |
340 | "%d for MacIO device %s\n", | 340 | "%d for MacIO device %s\n", |
341 | index, dev->ofdev.dev.bus_id); | 341 | index, dev_name(&dev->ofdev.dev)); |
342 | } | 342 | } |
343 | } | 343 | } |
344 | dev->n_resources = index; | 344 | dev->n_resources = index; |
@@ -385,8 +385,8 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, | |||
385 | 385 | ||
386 | /* MacIO itself has a different reg, we use it's PCI base */ | 386 | /* MacIO itself has a different reg, we use it's PCI base */ |
387 | if (np == chip->of_node) { | 387 | if (np == chip->of_node) { |
388 | sprintf(dev->ofdev.dev.bus_id, "%1d.%08x:%.*s", | 388 | dev_set_name(&dev->ofdev.dev, "%1d.%08x:%.*s", |
389 | chip->lbus.index, | 389 | chip->lbus.index, |
390 | #ifdef CONFIG_PCI | 390 | #ifdef CONFIG_PCI |
391 | (unsigned int)pci_resource_start(chip->lbus.pdev, 0), | 391 | (unsigned int)pci_resource_start(chip->lbus.pdev, 0), |
392 | #else | 392 | #else |
@@ -395,9 +395,9 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, | |||
395 | MAX_NODE_NAME_SIZE, np->name); | 395 | MAX_NODE_NAME_SIZE, np->name); |
396 | } else { | 396 | } else { |
397 | reg = of_get_property(np, "reg", NULL); | 397 | reg = of_get_property(np, "reg", NULL); |
398 | sprintf(dev->ofdev.dev.bus_id, "%1d.%08x:%.*s", | 398 | dev_set_name(&dev->ofdev.dev, "%1d.%08x:%.*s", |
399 | chip->lbus.index, | 399 | chip->lbus.index, |
400 | reg ? *reg : 0, MAX_NODE_NAME_SIZE, np->name); | 400 | reg ? *reg : 0, MAX_NODE_NAME_SIZE, np->name); |
401 | } | 401 | } |
402 | 402 | ||
403 | /* Setup interrupts & resources */ | 403 | /* Setup interrupts & resources */ |
@@ -408,7 +408,7 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, | |||
408 | /* Register with core */ | 408 | /* Register with core */ |
409 | if (of_device_register(&dev->ofdev) != 0) { | 409 | if (of_device_register(&dev->ofdev) != 0) { |
410 | printk(KERN_DEBUG"macio: device registration error for %s!\n", | 410 | printk(KERN_DEBUG"macio: device registration error for %s!\n", |
411 | dev->ofdev.dev.bus_id); | 411 | dev_name(&dev->ofdev.dev)); |
412 | kfree(dev); | 412 | kfree(dev); |
413 | return NULL; | 413 | return NULL; |
414 | } | 414 | } |
@@ -558,7 +558,7 @@ err_out: | |||
558 | resource_no, | 558 | resource_no, |
559 | macio_resource_len(dev, resource_no), | 559 | macio_resource_len(dev, resource_no), |
560 | macio_resource_start(dev, resource_no), | 560 | macio_resource_start(dev, resource_no), |
561 | dev->ofdev.dev.bus_id); | 561 | dev_name(&dev->ofdev.dev)); |
562 | return -EBUSY; | 562 | return -EBUSY; |
563 | } | 563 | } |
564 | 564 | ||