diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 16:13:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 16:13:47 -0400 |
commit | 53baaaa9682c230410a057263d1ce2922f43ddc4 (patch) | |
tree | f5cced5622130f780d76953b284a631c3d226488 /arch/arm | |
parent | f10140fbe5f97ecfeda986a12d0f1bad75642779 (diff) | |
parent | 3f9787046ea37a26170dc4439efa21f8d23a9978 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (79 commits)
arm: bus_id -> dev_name() and dev_set_name() conversions
sparc64: fix up bus_id changes in sparc core code
3c59x: handle pci_name() being const
MTD: handle pci_name() being const
HP iLO driver
sysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute
sysdev: Add utility functions for simple int/ulong variable sysdev attributes
sysdev: Pass the attribute to the low level sysdev show/store function
driver core: Suppress sysfs warnings for device_rename().
kobject: Transmit return value of call_usermodehelper() to caller
sysfs-rules.txt: reword API stability statement
debugfs: Implement debugfs_remove_recursive()
HOWTO: change email addresses of James in HOWTO
always enable FW_LOADER unless EMBEDDED=y
uio-howto.tmpl: use unique output names
uio-howto.tmpl: use standard copyright/legal markings
sysfs: don't call notify_change
sysdev: fix debugging statements in registration code.
kobject: should use kobject_put() in kset-example
kobject: reorder kobject to save space on 64 bit builds
...
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/common/dmabounce.c | 22 | ||||
-rw-r--r-- | arch/arm/common/locomo.c | 2 | ||||
-rw-r--r-- | arch/arm/common/sa1111.c | 10 | ||||
-rw-r--r-- | arch/arm/common/scoop.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/ecard.c | 5 | ||||
-rw-r--r-- | arch/arm/kernel/time.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-integrator/impd1.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-integrator/lm.c | 6 | ||||
-rw-r--r-- | arch/arm/plat-omap/mailbox.c | 2 |
9 files changed, 28 insertions, 32 deletions
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 2744673314b4..dd2947342604 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c | |||
@@ -554,9 +554,8 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size, | |||
554 | 554 | ||
555 | device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC); | 555 | device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC); |
556 | if (!device_info) { | 556 | if (!device_info) { |
557 | printk(KERN_ERR | 557 | dev_err(dev, |
558 | "Could not allocated dmabounce_device_info for %s", | 558 | "Could not allocated dmabounce_device_info\n"); |
559 | dev->bus_id); | ||
560 | return -ENOMEM; | 559 | return -ENOMEM; |
561 | } | 560 | } |
562 | 561 | ||
@@ -594,8 +593,7 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size, | |||
594 | 593 | ||
595 | dev->archdata.dmabounce = device_info; | 594 | dev->archdata.dmabounce = device_info; |
596 | 595 | ||
597 | printk(KERN_INFO "dmabounce: registered device %s on %s bus\n", | 596 | dev_info(dev, "dmabounce: registered device\n"); |
598 | dev->bus_id, dev->bus->name); | ||
599 | 597 | ||
600 | return 0; | 598 | return 0; |
601 | 599 | ||
@@ -614,16 +612,15 @@ dmabounce_unregister_dev(struct device *dev) | |||
614 | dev->archdata.dmabounce = NULL; | 612 | dev->archdata.dmabounce = NULL; |
615 | 613 | ||
616 | if (!device_info) { | 614 | if (!device_info) { |
617 | printk(KERN_WARNING | 615 | dev_warn(dev, |
618 | "%s: Never registered with dmabounce but attempting" \ | 616 | "Never registered with dmabounce but attempting" |
619 | "to unregister!\n", dev->bus_id); | 617 | "to unregister!\n"); |
620 | return; | 618 | return; |
621 | } | 619 | } |
622 | 620 | ||
623 | if (!list_empty(&device_info->safe_buffers)) { | 621 | if (!list_empty(&device_info->safe_buffers)) { |
624 | printk(KERN_ERR | 622 | dev_err(dev, |
625 | "%s: Removing from dmabounce with pending buffers!\n", | 623 | "Removing from dmabounce with pending buffers!\n"); |
626 | dev->bus_id); | ||
627 | BUG(); | 624 | BUG(); |
628 | } | 625 | } |
629 | 626 | ||
@@ -639,8 +636,7 @@ dmabounce_unregister_dev(struct device *dev) | |||
639 | 636 | ||
640 | kfree(device_info); | 637 | kfree(device_info); |
641 | 638 | ||
642 | printk(KERN_INFO "dmabounce: device %s on %s bus unregistered\n", | 639 | dev_info(dev, "dmabounce: device unregistered\n"); |
643 | dev->bus_id, dev->bus->name); | ||
644 | } | 640 | } |
645 | 641 | ||
646 | 642 | ||
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index d973c986f721..c3c3a3339049 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c | |||
@@ -543,7 +543,6 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info) | |||
543 | goto out; | 543 | goto out; |
544 | } | 544 | } |
545 | 545 | ||
546 | strncpy(dev->dev.bus_id, info->name, sizeof(dev->dev.bus_id)); | ||
547 | /* | 546 | /* |
548 | * If the parent device has a DMA mask associated with it, | 547 | * If the parent device has a DMA mask associated with it, |
549 | * propagate it down to the children. | 548 | * propagate it down to the children. |
@@ -553,6 +552,7 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info) | |||
553 | dev->dev.dma_mask = &dev->dma_mask; | 552 | dev->dev.dma_mask = &dev->dma_mask; |
554 | } | 553 | } |
555 | 554 | ||
555 | dev_set_name(&dev->dev, "%s", info->name); | ||
556 | dev->devid = info->devid; | 556 | dev->devid = info->devid; |
557 | dev->dev.parent = lchip->dev; | 557 | dev->dev.parent = lchip->dev; |
558 | dev->dev.bus = &locomo_bus_type; | 558 | dev->dev.bus = &locomo_bus_type; |
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index eb06d0b2cb74..c8e8f0ea59e1 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -550,9 +550,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
550 | goto out; | 550 | goto out; |
551 | } | 551 | } |
552 | 552 | ||
553 | snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), | 553 | dev_set_name(&dev->dev, "%4.4lx", info->offset); |
554 | "%4.4lx", info->offset); | ||
555 | |||
556 | dev->devid = info->devid; | 554 | dev->devid = info->devid; |
557 | dev->dev.parent = sachip->dev; | 555 | dev->dev.parent = sachip->dev; |
558 | dev->dev.bus = &sa1111_bus_type; | 556 | dev->dev.bus = &sa1111_bus_type; |
@@ -560,7 +558,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
560 | dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask; | 558 | dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask; |
561 | dev->res.start = sachip->phys + info->offset; | 559 | dev->res.start = sachip->phys + info->offset; |
562 | dev->res.end = dev->res.start + 511; | 560 | dev->res.end = dev->res.start + 511; |
563 | dev->res.name = dev->dev.bus_id; | 561 | dev->res.name = dev_name(&dev->dev); |
564 | dev->res.flags = IORESOURCE_MEM; | 562 | dev->res.flags = IORESOURCE_MEM; |
565 | dev->mapbase = sachip->base + info->offset; | 563 | dev->mapbase = sachip->base + info->offset; |
566 | dev->skpcr_mask = info->skpcr_mask; | 564 | dev->skpcr_mask = info->skpcr_mask; |
@@ -570,6 +568,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
570 | if (ret) { | 568 | if (ret) { |
571 | printk("SA1111: failed to allocate resource for %s\n", | 569 | printk("SA1111: failed to allocate resource for %s\n", |
572 | dev->res.name); | 570 | dev->res.name); |
571 | dev_set_name(&dev->dev, NULL); | ||
573 | kfree(dev); | 572 | kfree(dev); |
574 | goto out; | 573 | goto out; |
575 | } | 574 | } |
@@ -593,7 +592,8 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
593 | if (dev->dma_mask != 0xffffffffUL) { | 592 | if (dev->dma_mask != 0xffffffffUL) { |
594 | ret = dmabounce_register_dev(&dev->dev, 1024, 4096); | 593 | ret = dmabounce_register_dev(&dev->dev, 1024, 4096); |
595 | if (ret) { | 594 | if (ret) { |
596 | printk("SA1111: Failed to register %s with dmabounce", dev->dev.bus_id); | 595 | dev_err(&dev->dev, "SA1111: Failed to register" |
596 | " with dmabounce\n"); | ||
597 | device_unregister(&dev->dev); | 597 | device_unregister(&dev->dev); |
598 | } | 598 | } |
599 | } | 599 | } |
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index bc299b07a6fa..ae39553589dd 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c | |||
@@ -247,7 +247,7 @@ static int __devinit scoop_probe(struct platform_device *pdev) | |||
247 | devptr->gpio.base = -1; | 247 | devptr->gpio.base = -1; |
248 | 248 | ||
249 | if (inf->gpio_base != 0) { | 249 | if (inf->gpio_base != 0) { |
250 | devptr->gpio.label = pdev->dev.bus_id; | 250 | devptr->gpio.label = dev_name(&pdev->dev); |
251 | devptr->gpio.base = inf->gpio_base; | 251 | devptr->gpio.base = inf->gpio_base; |
252 | devptr->gpio.ngpio = 12; /* PA11 = 0, PA12 = 1, etc. up to PA22 = 11 */ | 252 | devptr->gpio.ngpio = 12; /* PA11 = 0, PA12 = 1, etc. up to PA22 = 11 */ |
253 | devptr->gpio.set = scoop_gpio_set; | 253 | devptr->gpio.set = scoop_gpio_set; |
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 8bfd299bfe77..f5cfdabcb87d 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -783,7 +783,7 @@ static void ecard_proc_init(void) | |||
783 | 783 | ||
784 | #define ec_set_resource(ec,nr,st,sz) \ | 784 | #define ec_set_resource(ec,nr,st,sz) \ |
785 | do { \ | 785 | do { \ |
786 | (ec)->resource[nr].name = ec->dev.bus_id; \ | 786 | (ec)->resource[nr].name = dev_name(&ec->dev); \ |
787 | (ec)->resource[nr].start = st; \ | 787 | (ec)->resource[nr].start = st; \ |
788 | (ec)->resource[nr].end = (st) + (sz) - 1; \ | 788 | (ec)->resource[nr].end = (st) + (sz) - 1; \ |
789 | (ec)->resource[nr].flags = IORESOURCE_MEM; \ | 789 | (ec)->resource[nr].flags = IORESOURCE_MEM; \ |
@@ -853,8 +853,7 @@ static struct expansion_card *__init ecard_alloc_card(int type, int slot) | |||
853 | for (i = 0; i < ECARD_NUM_RESOURCES; i++) { | 853 | for (i = 0; i < ECARD_NUM_RESOURCES; i++) { |
854 | if (ec->resource[i].flags && | 854 | if (ec->resource[i].flags && |
855 | request_resource(&iomem_resource, &ec->resource[i])) { | 855 | request_resource(&iomem_resource, &ec->resource[i])) { |
856 | printk(KERN_ERR "%s: resource(s) not available\n", | 856 | dev_err(&ec->dev, "resource(s) not available\n"); |
857 | ec->dev.bus_id); | ||
858 | ec->resource[i].end -= ec->resource[i].start; | 857 | ec->resource[i].end -= ec->resource[i].start; |
859 | ec->resource[i].start = 0; | 858 | ec->resource[i].start = 0; |
860 | ec->resource[i].flags = 0; | 859 | ec->resource[i].flags = 0; |
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index cc5145b28e7f..368d171754cf 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -130,7 +130,9 @@ static const struct leds_evt_name evt_names[] = { | |||
130 | { "red", led_red_on, led_red_off }, | 130 | { "red", led_red_on, led_red_off }, |
131 | }; | 131 | }; |
132 | 132 | ||
133 | static ssize_t leds_store(struct sys_device *dev, const char *buf, size_t size) | 133 | static ssize_t leds_store(struct sys_device *dev, |
134 | struct sysdev_attribute *attr, | ||
135 | const char *buf, size_t size) | ||
134 | { | 136 | { |
135 | int ret = -EINVAL, len = strcspn(buf, " "); | 137 | int ret = -EINVAL, len = strcspn(buf, " "); |
136 | 138 | ||
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 62e653a3ea1a..5a1588cf8242 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -393,9 +393,7 @@ static int impd1_probe(struct lm_device *dev) | |||
393 | if (!d) | 393 | if (!d) |
394 | continue; | 394 | continue; |
395 | 395 | ||
396 | snprintf(d->dev.bus_id, sizeof(d->dev.bus_id), | 396 | dev_set_name(&d->dev, "lm%x:%5.5lx", dev->id, idev->offset >> 12); |
397 | "lm%x:%5.5lx", dev->id, idev->offset >> 12); | ||
398 | |||
399 | d->dev.parent = &dev->dev; | 397 | d->dev.parent = &dev->dev; |
400 | d->res.start = dev->resource.start + idev->offset; | 398 | d->res.start = dev->resource.start + idev->offset; |
401 | d->res.end = d->res.start + SZ_4K - 1; | 399 | d->res.end = d->res.start + SZ_4K - 1; |
@@ -407,8 +405,7 @@ static int impd1_probe(struct lm_device *dev) | |||
407 | 405 | ||
408 | ret = amba_device_register(d, &dev->resource); | 406 | ret = amba_device_register(d, &dev->resource); |
409 | if (ret) { | 407 | if (ret) { |
410 | printk("unable to register device %s: %d\n", | 408 | dev_err(&d->dev, "unable to register device: %d\n"); |
411 | d->dev.bus_id, ret); | ||
412 | kfree(d); | 409 | kfree(d); |
413 | } | 410 | } |
414 | } | 411 | } |
diff --git a/arch/arm/mach-integrator/lm.c b/arch/arm/mach-integrator/lm.c index 622cdc4212dd..f939c5091405 100644 --- a/arch/arm/mach-integrator/lm.c +++ b/arch/arm/mach-integrator/lm.c | |||
@@ -81,8 +81,10 @@ int lm_device_register(struct lm_device *dev) | |||
81 | dev->dev.release = lm_device_release; | 81 | dev->dev.release = lm_device_release; |
82 | dev->dev.bus = &lm_bustype; | 82 | dev->dev.bus = &lm_bustype; |
83 | 83 | ||
84 | snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), "lm%d", dev->id); | 84 | ret = dev_set_name(&dev->dev, "lm%d", dev->id); |
85 | dev->resource.name = dev->dev.bus_id; | 85 | if (ret) |
86 | return ret; | ||
87 | dev->resource.name = dev_name(&dev->dev); | ||
86 | 88 | ||
87 | ret = request_resource(&iomem_resource, &dev->resource); | 89 | ret = request_resource(&iomem_resource, &dev->resource); |
88 | if (ret == 0) { | 90 | if (ret == 0) { |
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 6f33f58bca45..ff1413eae0b8 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c | |||
@@ -334,7 +334,7 @@ static int omap_mbox_init(struct omap_mbox *mbox) | |||
334 | } | 334 | } |
335 | 335 | ||
336 | mbox->dev.class = &omap_mbox_class; | 336 | mbox->dev.class = &omap_mbox_class; |
337 | strlcpy(mbox->dev.bus_id, mbox->name, KOBJ_NAME_LEN); | 337 | dev_set_name(&mbox->dev, "%s", mbox->name); |
338 | dev_set_drvdata(&mbox->dev, mbox); | 338 | dev_set_drvdata(&mbox->dev, mbox); |
339 | 339 | ||
340 | ret = device_register(&mbox->dev); | 340 | ret = device_register(&mbox->dev); |