thermal: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
0bad16aa08
commit
354655ea97
1 changed files with 3 additions and 3 deletions
|
@ -579,7 +579,7 @@ static void thermal_release(struct device *dev)
|
||||||
struct thermal_zone_device *tz;
|
struct thermal_zone_device *tz;
|
||||||
struct thermal_cooling_device *cdev;
|
struct thermal_cooling_device *cdev;
|
||||||
|
|
||||||
if (!strncmp(dev->bus_id, "thermal_zone", sizeof "thermal_zone" - 1)) {
|
if (!strncmp(dev_name(dev), "thermal_zone", sizeof "thermal_zone" - 1)) {
|
||||||
tz = to_thermal_zone(dev);
|
tz = to_thermal_zone(dev);
|
||||||
kfree(tz);
|
kfree(tz);
|
||||||
} else {
|
} else {
|
||||||
|
@ -630,7 +630,7 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type,
|
||||||
cdev->ops = ops;
|
cdev->ops = ops;
|
||||||
cdev->device.class = &thermal_class;
|
cdev->device.class = &thermal_class;
|
||||||
cdev->devdata = devdata;
|
cdev->devdata = devdata;
|
||||||
sprintf(cdev->device.bus_id, "cooling_device%d", cdev->id);
|
dev_set_name(&cdev->device, "cooling_device%d", cdev->id);
|
||||||
result = device_register(&cdev->device);
|
result = device_register(&cdev->device);
|
||||||
if (result) {
|
if (result) {
|
||||||
release_idr(&thermal_cdev_idr, &thermal_idr_lock, cdev->id);
|
release_idr(&thermal_cdev_idr, &thermal_idr_lock, cdev->id);
|
||||||
|
@ -769,7 +769,7 @@ struct thermal_zone_device *thermal_zone_device_register(char *type,
|
||||||
tz->device.class = &thermal_class;
|
tz->device.class = &thermal_class;
|
||||||
tz->devdata = devdata;
|
tz->devdata = devdata;
|
||||||
tz->trips = trips;
|
tz->trips = trips;
|
||||||
sprintf(tz->device.bus_id, "thermal_zone%d", tz->id);
|
dev_set_name(&tz->device, "thermal_zone%d", tz->id);
|
||||||
result = device_register(&tz->device);
|
result = device_register(&tz->device);
|
||||||
if (result) {
|
if (result) {
|
||||||
release_idr(&thermal_tz_idr, &thermal_idr_lock, tz->id);
|
release_idr(&thermal_tz_idr, &thermal_idr_lock, tz->id);
|
||||||
|
|
Loading…
Reference in a new issue