aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-05-02 00:02:41 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-22 00:54:53 -0400
commitfc3a8828b139c24aade3f9d608775e36c248f8f5 (patch)
treee995fdb99868b96e6c51c100fe9270a79323fd83 /drivers/acpi
parentb98cb4b7fe0e83238501b48489e46b3e0dce9aaf (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 'drivers/acpi')
-rw-r--r--drivers/acpi/fan.c10
-rw-r--r--drivers/acpi/glue.c6
-rw-r--r--drivers/acpi/processor_core.c5
-rw-r--r--drivers/acpi/scan.c2
-rw-r--r--drivers/acpi/thermal.c4
-rw-r--r--drivers/acpi/video.c5
6 files changed, 14 insertions, 18 deletions
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index 55c17afbe669..2655bc1b4eeb 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -263,22 +263,22 @@ static int acpi_fan_add(struct acpi_device *device)
263 goto end; 263 goto end;
264 } 264 }
265 265
266 printk(KERN_INFO PREFIX 266 dev_info(&device->dev, "registered as cooling_device%d\n", cdev->id);
267 "%s is registered as cooling_device%d\n",
268 device->dev.bus_id, cdev->id);
269 267
270 acpi_driver_data(device) = cdev; 268 acpi_driver_data(device) = cdev;
271 result = sysfs_create_link(&device->dev.kobj, 269 result = sysfs_create_link(&device->dev.kobj,
272 &cdev->device.kobj, 270 &cdev->device.kobj,
273 "thermal_cooling"); 271 "thermal_cooling");
274 if (result) 272 if (result)
275 printk(KERN_ERR PREFIX "Create sysfs link\n"); 273 dev_err(&device->dev, "Failed to create sysfs link "
274 "'thermal_cooling'\n");
276 275
277 result = sysfs_create_link(&cdev->device.kobj, 276 result = sysfs_create_link(&cdev->device.kobj,
278 &device->dev.kobj, 277 &device->dev.kobj,
279 "device"); 278 "device");
280 if (result) 279 if (result)
281 printk(KERN_ERR PREFIX "Create sysfs link\n"); 280 dev_err(&device->dev, "Failed to create sysfs link "
281 "'device'\n");
282 282
283 result = acpi_fan_add_fs(device); 283 result = acpi_fan_add_fs(device);
284 if (result) 284 if (result)
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 2f173e83f8a7..084109507c9f 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -146,8 +146,7 @@ static int acpi_bind_one(struct device *dev, acpi_handle handle)
146 acpi_status status; 146 acpi_status status;
147 147
148 if (dev->archdata.acpi_handle) { 148 if (dev->archdata.acpi_handle) {
149 printk(KERN_WARNING PREFIX 149 dev_warn(dev, "Drivers changed 'acpi_handle'\n");
150 "Drivers changed 'acpi_handle' for %s\n", dev->bus_id);
151 return -EINVAL; 150 return -EINVAL;
152 } 151 }
153 get_device(dev); 152 get_device(dev);
@@ -195,8 +194,7 @@ static int acpi_unbind_one(struct device *dev)
195 /* acpi_bind_one increase refcnt by one */ 194 /* acpi_bind_one increase refcnt by one */
196 put_device(dev); 195 put_device(dev);
197 } else { 196 } else {
198 printk(KERN_ERR PREFIX 197 dev_err(dev, "Oops, 'acpi_handle' corrupt\n");
199 "Oops, 'acpi_handle' corrupt for %s\n", dev->bus_id);
200 } 198 }
201 return 0; 199 return 0;
202} 200}
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index ec0f2d581ece..e36422a7122c 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -714,9 +714,8 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
714 goto end; 714 goto end;
715 } 715 }
716 716
717 printk(KERN_INFO PREFIX 717 dev_info(&device->dev, "registered as cooling_device%d\n",
718 "%s is registered as cooling_device%d\n", 718 pr->cdev->id);
719 device->dev.bus_id, pr->cdev->id);
720 719
721 result = sysfs_create_link(&device->dev.kobj, 720 result = sysfs_create_link(&device->dev.kobj,
722 &pr->cdev->device.kobj, 721 &pr->cdev->device.kobj,
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index f3132aa47a69..f6f52c1a2aba 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -471,7 +471,7 @@ static int acpi_device_register(struct acpi_device *device,
471 device->dev.release = &acpi_device_release; 471 device->dev.release = &acpi_device_release;
472 result = device_add(&device->dev); 472 result = device_add(&device->dev);
473 if(result) { 473 if(result) {
474 printk(KERN_ERR PREFIX "Error adding device %s", device->dev.bus_id); 474 dev_err(&device->dev, "Error adding device\n");
475 goto end; 475 goto end;
476 } 476 }
477 477
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 84c795fb9b1e..30a341337933 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -1179,8 +1179,8 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
1179 1179
1180 tz->tz_enabled = 1; 1180 tz->tz_enabled = 1;
1181 1181
1182 printk(KERN_INFO PREFIX "%s is registered as thermal_zone%d\n", 1182 dev_info(&tz->device->dev, "registered as thermal_zone%d\n",
1183 tz->device->dev.bus_id, tz->thermal_zone->id); 1183 tz->thermal_zone->id);
1184 return 0; 1184 return 0;
1185} 1185}
1186 1186
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 64c889331f3b..37b9e16710d6 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -762,9 +762,8 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
762 if (IS_ERR(device->cdev)) 762 if (IS_ERR(device->cdev))
763 return; 763 return;
764 764
765 printk(KERN_INFO PREFIX 765 dev_info(&device->dev->dev, "registered as cooling_device%d\n",
766 "%s is registered as cooling_device%d\n", 766 device->cdev->id);
767 device->dev->dev.bus_id, device->cdev->id);
768 result = sysfs_create_link(&device->dev->dev.kobj, 767 result = sysfs_create_link(&device->dev->dev.kobj,
769 &device->cdev->device.kobj, 768 &device->cdev->device.kobj,
770 "thermal_cooling"); 769 "thermal_cooling");