aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/thermal.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-10-29 20:18:59 -0400
committerLen Brown <len.brown@intel.com>2008-11-06 21:37:19 -0500
commit0794469da3f7b2093575cbdfc1108308dd3641ce (patch)
tree46a20312fa37dcc05ddba1a53b9ac7bab182c57c /drivers/acpi/thermal.c
parent457d2ee225801441e96f2e35894ec404572ad862 (diff)
ACPI: struct device - replace bus_id with dev_name(), dev_set_name()
This patch is part of a larger patch series which will remove the "char bus_id[20]" name string from struct device. The device name is managed in the kobject anyway, and without any size limitation, and just needlessly copied into "struct device". To set and read the device name dev_name(dev) and dev_set_name(dev) must be used. If your code uses static kobjects, which it shouldn't do, "const char *init_name" can be used to statically provide the name the registered device should have. At registration time, the init_name field is cleared, to enforce the use of dev_name(dev) to access the device name at a later time. We need to get rid of all occurrences of bus_id in the entire tree to be able to enable the new interface. Please apply this patch, and possibly convert any remaining remaining occurrences of bus_id. We want to submit a patch to -next, which will remove bus_id from "struct device", to find the remaining pieces to convert, and finally switch over to the new api, which will remove the 20 bytes array and does no longer have a size limitation. Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r--drivers/acpi/thermal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index ad6cae938f0b..462b16878851 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -576,7 +576,7 @@ static int acpi_thermal_critical(struct acpi_thermal *tz)
576 acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL, 576 acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL,
577 tz->trips.critical.flags.enabled); 577 tz->trips.critical.flags.enabled);
578 acpi_bus_generate_netlink_event(tz->device->pnp.device_class, 578 acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
579 tz->device->dev.bus_id, 579 dev_name(&tz->device->dev),
580 ACPI_THERMAL_NOTIFY_CRITICAL, 580 ACPI_THERMAL_NOTIFY_CRITICAL,
581 tz->trips.critical.flags.enabled); 581 tz->trips.critical.flags.enabled);
582 582
@@ -605,7 +605,7 @@ static int acpi_thermal_hot(struct acpi_thermal *tz)
605 acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_HOT, 605 acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_HOT,
606 tz->trips.hot.flags.enabled); 606 tz->trips.hot.flags.enabled);
607 acpi_bus_generate_netlink_event(tz->device->pnp.device_class, 607 acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
608 tz->device->dev.bus_id, 608 dev_name(&tz->device->dev),
609 ACPI_THERMAL_NOTIFY_HOT, 609 ACPI_THERMAL_NOTIFY_HOT,
610 tz->trips.hot.flags.enabled); 610 tz->trips.hot.flags.enabled);
611 611
@@ -1592,14 +1592,14 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
1592 acpi_thermal_check(tz); 1592 acpi_thermal_check(tz);
1593 acpi_bus_generate_proc_event(device, event, 0); 1593 acpi_bus_generate_proc_event(device, event, 0);
1594 acpi_bus_generate_netlink_event(device->pnp.device_class, 1594 acpi_bus_generate_netlink_event(device->pnp.device_class,
1595 device->dev.bus_id, event, 0); 1595 dev_name(&device->dev), event, 0);
1596 break; 1596 break;
1597 case ACPI_THERMAL_NOTIFY_DEVICES: 1597 case ACPI_THERMAL_NOTIFY_DEVICES:
1598 acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_DEVICES); 1598 acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_DEVICES);
1599 acpi_thermal_check(tz); 1599 acpi_thermal_check(tz);
1600 acpi_bus_generate_proc_event(device, event, 0); 1600 acpi_bus_generate_proc_event(device, event, 0);
1601 acpi_bus_generate_netlink_event(device->pnp.device_class, 1601 acpi_bus_generate_netlink_event(device->pnp.device_class,
1602 device->dev.bus_id, event, 0); 1602 dev_name(&device->dev), event, 0);
1603 break; 1603 break;
1604 default: 1604 default:
1605 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 1605 ACPI_DEBUG_PRINT((ACPI_DB_INFO,