mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
b98cb4b7fe
commit
fc3a8828b1
14 changed files with 32 additions and 45 deletions
|
|
@ -263,22 +263,22 @@ static int acpi_fan_add(struct acpi_device *device)
|
|||
goto end;
|
||||
}
|
||||
|
||||
printk(KERN_INFO PREFIX
|
||||
"%s is registered as cooling_device%d\n",
|
||||
device->dev.bus_id, cdev->id);
|
||||
dev_info(&device->dev, "registered as cooling_device%d\n", cdev->id);
|
||||
|
||||
acpi_driver_data(device) = cdev;
|
||||
result = sysfs_create_link(&device->dev.kobj,
|
||||
&cdev->device.kobj,
|
||||
"thermal_cooling");
|
||||
if (result)
|
||||
printk(KERN_ERR PREFIX "Create sysfs link\n");
|
||||
dev_err(&device->dev, "Failed to create sysfs link "
|
||||
"'thermal_cooling'\n");
|
||||
|
||||
result = sysfs_create_link(&cdev->device.kobj,
|
||||
&device->dev.kobj,
|
||||
"device");
|
||||
if (result)
|
||||
printk(KERN_ERR PREFIX "Create sysfs link\n");
|
||||
dev_err(&device->dev, "Failed to create sysfs link "
|
||||
"'device'\n");
|
||||
|
||||
result = acpi_fan_add_fs(device);
|
||||
if (result)
|
||||
|
|
|
|||
|
|
@ -146,8 +146,7 @@ static int acpi_bind_one(struct device *dev, acpi_handle handle)
|
|||
acpi_status status;
|
||||
|
||||
if (dev->archdata.acpi_handle) {
|
||||
printk(KERN_WARNING PREFIX
|
||||
"Drivers changed 'acpi_handle' for %s\n", dev->bus_id);
|
||||
dev_warn(dev, "Drivers changed 'acpi_handle'\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
get_device(dev);
|
||||
|
|
@ -195,8 +194,7 @@ static int acpi_unbind_one(struct device *dev)
|
|||
/* acpi_bind_one increase refcnt by one */
|
||||
put_device(dev);
|
||||
} else {
|
||||
printk(KERN_ERR PREFIX
|
||||
"Oops, 'acpi_handle' corrupt for %s\n", dev->bus_id);
|
||||
dev_err(dev, "Oops, 'acpi_handle' corrupt\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -714,9 +714,8 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
|
|||
goto end;
|
||||
}
|
||||
|
||||
printk(KERN_INFO PREFIX
|
||||
"%s is registered as cooling_device%d\n",
|
||||
device->dev.bus_id, pr->cdev->id);
|
||||
dev_info(&device->dev, "registered as cooling_device%d\n",
|
||||
pr->cdev->id);
|
||||
|
||||
result = sysfs_create_link(&device->dev.kobj,
|
||||
&pr->cdev->device.kobj,
|
||||
|
|
|
|||
|
|
@ -471,7 +471,7 @@ static int acpi_device_register(struct acpi_device *device,
|
|||
device->dev.release = &acpi_device_release;
|
||||
result = device_add(&device->dev);
|
||||
if(result) {
|
||||
printk(KERN_ERR PREFIX "Error adding device %s", device->dev.bus_id);
|
||||
dev_err(&device->dev, "Error adding device\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1179,8 +1179,8 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
|
|||
|
||||
tz->tz_enabled = 1;
|
||||
|
||||
printk(KERN_INFO PREFIX "%s is registered as thermal_zone%d\n",
|
||||
tz->device->dev.bus_id, tz->thermal_zone->id);
|
||||
dev_info(&tz->device->dev, "registered as thermal_zone%d\n",
|
||||
tz->thermal_zone->id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -762,9 +762,8 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
|
|||
if (IS_ERR(device->cdev))
|
||||
return;
|
||||
|
||||
printk(KERN_INFO PREFIX
|
||||
"%s is registered as cooling_device%d\n",
|
||||
device->dev->dev.bus_id, device->cdev->id);
|
||||
dev_info(&device->dev->dev, "registered as cooling_device%d\n",
|
||||
device->cdev->id);
|
||||
result = sysfs_create_link(&device->dev->dev.kobj,
|
||||
&device->cdev->device.kobj,
|
||||
"thermal_cooling");
|
||||
|
|
|
|||
Loading…
Reference in a new issue