Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc3a8828 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b98cb4b7
Loading
Loading
Loading
Loading
+9 −13
Original line number Diff line number Diff line
@@ -554,9 +554,8 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,

	device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC);
	if (!device_info) {
		printk(KERN_ERR
			"Could not allocated dmabounce_device_info for %s",
			dev->bus_id);
		dev_err(dev,
			"Could not allocated dmabounce_device_info\n");
		return -ENOMEM;
	}

@@ -594,8 +593,7 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,

	dev->archdata.dmabounce = device_info;

	printk(KERN_INFO "dmabounce: registered device %s on %s bus\n",
		dev->bus_id, dev->bus->name);
	dev_info(dev, "dmabounce: registered device\n");

	return 0;

@@ -614,16 +612,15 @@ dmabounce_unregister_dev(struct device *dev)
	dev->archdata.dmabounce = NULL;

	if (!device_info) {
		printk(KERN_WARNING
			"%s: Never registered with dmabounce but attempting" \
			"to unregister!\n", dev->bus_id);
		dev_warn(dev,
			 "Never registered with dmabounce but attempting"
			 "to unregister!\n");
		return;
	}

	if (!list_empty(&device_info->safe_buffers)) {
		printk(KERN_ERR
			"%s: Removing from dmabounce with pending buffers!\n",
			dev->bus_id);
		dev_err(dev,
			"Removing from dmabounce with pending buffers!\n");
		BUG();
	}

@@ -639,8 +636,7 @@ dmabounce_unregister_dev(struct device *dev)

	kfree(device_info);

	printk(KERN_INFO "dmabounce: device %s on %s bus unregistered\n",
		dev->bus_id, dev->bus->name);
	dev_info(dev, "dmabounce: device unregistered\n");
}


+2 −1
Original line number Diff line number Diff line
@@ -593,7 +593,8 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
		if (dev->dma_mask != 0xffffffffUL) {
			ret = dmabounce_register_dev(&dev->dev, 1024, 4096);
			if (ret) {
				printk("SA1111: Failed to register %s with dmabounce", dev->dev.bus_id);
				dev_err(&dev->dev, "SA1111: Failed to register"
					" with dmabounce\n");
				device_unregister(&dev->dev);
			}
		}
+1 −2
Original line number Diff line number Diff line
@@ -853,8 +853,7 @@ static struct expansion_card *__init ecard_alloc_card(int type, int slot)
	for (i = 0; i < ECARD_NUM_RESOURCES; i++) {
		if (ec->resource[i].flags &&
		    request_resource(&iomem_resource, &ec->resource[i])) {
			printk(KERN_ERR "%s: resource(s) not available\n",
				ec->dev.bus_id);
			dev_err(&ec->dev, "resource(s) not available\n");
			ec->resource[i].end -= ec->resource[i].start;
			ec->resource[i].start = 0;
			ec->resource[i].flags = 0;
+1 −2
Original line number Diff line number Diff line
@@ -407,8 +407,7 @@ static int impd1_probe(struct lm_device *dev)

		ret = amba_device_register(d, &dev->resource);
		if (ret) {
			printk("unable to register device %s: %d\n",
				d->dev.bus_id, ret);
			dev_err(&d->dev, "unable to register device: %d\n");
			kfree(d);
		}
	}
+1 −1
Original line number Diff line number Diff line
@@ -367,7 +367,7 @@ static void chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide)
	viaisa = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL);
	if (!viaisa)
		return;
	printk("Fixing VIA IDE, force legacy mode on '%s'\n", viaide->dev.bus_id);
	dev_info(&viaide->dev, "Fixing VIA IDE, force legacy mode on\n");

	pci_read_config_byte(viaide, PCI_CLASS_PROG, &progif);
	pci_write_config_byte(viaide, PCI_CLASS_PROG, progif & ~0x5);
Loading