From: Keiichiro T. <tok...@jp...> - 2004-11-26 02:39:00
|
On Thu, 25 Nov 2004 10:15:48 -0800 Greg KH wrote: > On Thu, Nov 25, 2004 at 11:02:57PM +0900, Keiichiro Tokunaga wrote: > > + if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &len, > > + "DRV_NAME=%s", dev->driver->name)) > > That should be PHYSDEVDRIVER not DRV_NAME to be consistant with the rest > of the driver core. Exactly. Thanks for the comments:) Len, I'm attaching an updated patch. Please apply. Thanks, Keiichiro Tokunaga Signed-off-by: Keiichiro Tokunaga <tok...@jp...> --- linux-2.6.10-rc2-mm3-kei/drivers/acpi/scan.c | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+) diff -puN drivers/acpi/scan.c~namespace_agent_support drivers/acpi/scan.c --- linux-2.6.10-rc2-mm3/drivers/acpi/scan.c~namespace_agent_support 2004-11-25 22:20:14.000000000 +0900 +++ linux-2.6.10-rc2-mm3-kei/drivers/acpi/scan.c 2004-11-26 08:57:47.048358808 +0900 @@ -81,12 +81,37 @@ static struct kobj_type ktype_acpi_ns = .release = acpi_device_release, }; +static int namespace_hotplug(struct kset *kset, struct kobject *kobj, + char **envp, int num_envp, char *buffer, + int buffer_size) +{ + struct acpi_device *dev = to_acpi_device(kobj); + int i = 0; + int len = 0; + + if (!dev->driver) + return 0; + + if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &len, + "PHYSDEVDRIVER=%s", dev->driver->name)) + return -ENOMEM; + + envp[i] = NULL; + + return 0; +} + +static struct kset_hotplug_ops namespace_hotplug_ops = { + .hotplug = &namespace_hotplug, +}; + static struct kset acpi_namespace_kset = { .kobj = { .name = "namespace", }, .subsys = &acpi_subsys, .ktype = &ktype_acpi_ns, + .hotplug_ops = &namespace_hotplug_ops, }; _ |