diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-02-25 09:52:38 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-02-25 09:52:38 +0100 |
commit | 308b892cb4e3161cf2b629c0af61181bbc5606b9 (patch) | |
tree | 5d62007b1413d842e7f5ba126b0924308ace6c9d /sound/pci/hda/hda_hwdep.c | |
parent | 20f4d6c3a2a23c5d7d9cc7f42fbb943ca7a03d1f (diff) | |
parent | cc374c477c9bf95f409fed16426856d86a97394f (diff) |
Merge branch 'fix/hda' into for-linus
Diffstat (limited to 'sound/pci/hda/hda_hwdep.c')
-rw-r--r-- | sound/pci/hda/hda_hwdep.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index 482fb0304ca..4ae51dcb81a 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c @@ -277,18 +277,19 @@ static ssize_t init_verbs_store(struct device *dev, { struct snd_hwdep *hwdep = dev_get_drvdata(dev); struct hda_codec *codec = hwdep->private_data; - char *p; - struct hda_verb verb, *v; + struct hda_verb *v; + int nid, verb, param; - verb.nid = simple_strtoul(buf, &p, 0); - verb.verb = simple_strtoul(p, &p, 0); - verb.param = simple_strtoul(p, &p, 0); - if (!verb.nid || !verb.verb || !verb.param) + if (sscanf(buf, "%i %i %i", &nid, &verb, ¶m) != 3) + return -EINVAL; + if (!nid || !verb) return -EINVAL; v = snd_array_new(&codec->init_verbs); if (!v) return -ENOMEM; - *v = verb; + v->nid = nid; + v->verb = verb; + v->param = param; return count; } |