summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-12 15:49:37 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-12 15:49:37 -0700
commitefefc6eb38d43b8e5daef482f575d767b002004e (patch)
tree8a3933db1f8721f9bcc9912c800dc8406f4bdf94 /sound
parent117494a1b65183f0e3fcc817b07944bc5c465050 (diff)
parentcd59abfcc441b2abb4cf2cd62c1eb0f02a60e8dd (diff)
downloadblackbird-op-linux-efefc6eb38d43b8e5daef482f575d767b002004e.tar.gz
blackbird-op-linux-efefc6eb38d43b8e5daef482f575d767b002004e.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (75 commits) PM: merge device power-management source files sysfs: add copyrights kobject: update the copyrights kset: add some kerneldoc to help describe what these strange things are Driver core: rename ktype_edd and ktype_efivar Driver core: rename ktype_driver Driver core: rename ktype_device Driver core: rename ktype_class driver core: remove subsystem_init() sysfs: move sysfs file poll implementation to sysfs_open_dirent sysfs: implement sysfs_open_dirent sysfs: move sysfs_dirent->s_children into sysfs_dirent->s_dir sysfs: make sysfs_root a regular directory dirent sysfs: open code sysfs_attach_dentry() sysfs: make s_elem an anonymous union sysfs: make bin attr open get active reference of parent too sysfs: kill unnecessary NULL pointer check in sysfs_release() sysfs: kill unnecessary sysfs_get() in open paths sysfs: reposition sysfs_dirent->s_mode. sysfs: kill sysfs_update_file() ...
Diffstat (limited to 'sound')
-rw-r--r--sound/aoa/soundbus/core.c33
1 files changed, 10 insertions, 23 deletions
diff --git a/sound/aoa/soundbus/core.c b/sound/aoa/soundbus/core.c
index 64d163914335..f84f3e505788 100644
--- a/sound/aoa/soundbus/core.c
+++ b/sound/aoa/soundbus/core.c
@@ -56,13 +56,12 @@ static int soundbus_probe(struct device *dev)
}
-static int soundbus_uevent(struct device *dev, char **envp, int num_envp,
- char *buffer, int buffer_size)
+static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env)
{
struct soundbus_dev * soundbus_dev;
struct of_device * of;
const char *compat;
- int retval = 0, i = 0, length = 0;
+ int retval = 0;
int cplen, seen = 0;
if (!dev)
@@ -75,15 +74,11 @@ static int soundbus_uevent(struct device *dev, char **envp, int num_envp,
of = &soundbus_dev->ofdev;
/* stuff we want to pass to /sbin/hotplug */
- retval = add_uevent_var(envp, num_envp, &i,
- buffer, buffer_size, &length,
- "OF_NAME=%s", of->node->name);
+ retval = add_uevent_var(env, "OF_NAME=%s", of->node->name);
if (retval)
return retval;
- retval = add_uevent_var(envp, num_envp, &i,
- buffer, buffer_size, &length,
- "OF_TYPE=%s", of->node->type);
+ retval = add_uevent_var(env, "OF_TYPE=%s", of->node->type);
if (retval)
return retval;
@@ -93,27 +88,19 @@ static int soundbus_uevent(struct device *dev, char **envp, int num_envp,
compat = of_get_property(of->node, "compatible", &cplen);
while (compat && cplen > 0) {
- int tmp = length;
- retval = add_uevent_var(envp, num_envp, &i,
- buffer, buffer_size, &length,
- "OF_COMPATIBLE_%d=%s", seen, compat);
+ int tmp = env->buflen;
+ retval = add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat);
if (retval)
return retval;
- compat += length - tmp;
- cplen -= length - tmp;
+ compat += env->buflen - tmp;
+ cplen -= env->buflen - tmp;
seen += 1;
}
- retval = add_uevent_var(envp, num_envp, &i,
- buffer, buffer_size, &length,
- "OF_COMPATIBLE_N=%d", seen);
+ retval = add_uevent_var(env, "OF_COMPATIBLE_N=%d", seen);
if (retval)
return retval;
- retval = add_uevent_var(envp, num_envp, &i,
- buffer, buffer_size, &length,
- "MODALIAS=%s", soundbus_dev->modalias);
-
- envp[i] = NULL;
+ retval = add_uevent_var(env, "MODALIAS=%s", soundbus_dev->modalias);
return retval;
}
OpenPOWER on IntegriCloud