Merge branch 'fix/hda' into topic/hda
This commit is contained in:
commit
d2f57cd54a
1 changed files with 8 additions and 7 deletions
|
@ -277,18 +277,19 @@ static ssize_t init_verbs_store(struct device *dev,
|
||||||
{
|
{
|
||||||
struct snd_hwdep *hwdep = dev_get_drvdata(dev);
|
struct snd_hwdep *hwdep = dev_get_drvdata(dev);
|
||||||
struct hda_codec *codec = hwdep->private_data;
|
struct hda_codec *codec = hwdep->private_data;
|
||||||
char *p;
|
struct hda_verb *v;
|
||||||
struct hda_verb verb, *v;
|
int nid, verb, param;
|
||||||
|
|
||||||
verb.nid = simple_strtoul(buf, &p, 0);
|
if (sscanf(buf, "%i %i %i", &nid, &verb, ¶m) != 3)
|
||||||
verb.verb = simple_strtoul(p, &p, 0);
|
return -EINVAL;
|
||||||
verb.param = simple_strtoul(p, &p, 0);
|
if (!nid || !verb)
|
||||||
if (!verb.nid || !verb.verb || !verb.param)
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
v = snd_array_new(&codec->init_verbs);
|
v = snd_array_new(&codec->init_verbs);
|
||||||
if (!v)
|
if (!v)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
*v = verb;
|
v->nid = nid;
|
||||||
|
v->verb = verb;
|
||||||
|
v->param = param;
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue