diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-02 00:02:41 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-22 00:54:53 -0400 |
commit | fc3a8828b139c24aade3f9d608775e36c248f8f5 (patch) | |
tree | e995fdb99868b96e6c51c100fe9270a79323fd83 /arch/arm/common | |
parent | b98cb4b7fe0e83238501b48489e46b3e0dce9aaf (diff) |
driver core: fix a lot of printk usages of bus_id
We have the dev_printk() variants for this kind of thing, use them
instead of directly trying to access the bus_id field of struct device.
This is done in order to remove bus_id entirely.
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/common')
-rw-r--r-- | arch/arm/common/dmabounce.c | 22 | ||||
-rw-r--r-- | arch/arm/common/sa1111.c | 3 |
2 files changed, 11 insertions, 14 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/sa1111.c b/arch/arm/common/sa1111.c index eb06d0b2cb74..2048ae0b1559 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -593,7 +593,8 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
593 | if (dev->dma_mask != 0xffffffffUL) { | 593 | if (dev->dma_mask != 0xffffffffUL) { |
594 | ret = dmabounce_register_dev(&dev->dev, 1024, 4096); | 594 | ret = dmabounce_register_dev(&dev->dev, 1024, 4096); |
595 | if (ret) { | 595 | if (ret) { |
596 | printk("SA1111: Failed to register %s with dmabounce", dev->dev.bus_id); | 596 | dev_err(&dev->dev, "SA1111: Failed to register" |
597 | " with dmabounce\n"); | ||
597 | device_unregister(&dev->dev); | 598 | device_unregister(&dev->dev); |
598 | } | 599 | } |
599 | } | 600 | } |