mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
device create: sound: convert device_create_drvdata to device_create
Now that device_create() has been audited, rename things back to the original call to be sane. Cc: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
d73a1a674b
commit
abe9ab8f62
4 changed files with 14 additions and 17 deletions
|
@ -549,9 +549,9 @@ int snd_card_register(struct snd_card *card)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
#ifndef CONFIG_SYSFS_DEPRECATED
|
#ifndef CONFIG_SYSFS_DEPRECATED
|
||||||
if (!card->card_dev) {
|
if (!card->card_dev) {
|
||||||
card->card_dev = device_create_drvdata(sound_class, card->dev,
|
card->card_dev = device_create(sound_class, card->dev,
|
||||||
MKDEV(0, 0), NULL,
|
MKDEV(0, 0), NULL,
|
||||||
"card%i", card->number);
|
"card%i", card->number);
|
||||||
if (IS_ERR(card->card_dev))
|
if (IS_ERR(card->card_dev))
|
||||||
card->card_dev = NULL;
|
card->card_dev = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -274,9 +274,8 @@ int snd_register_device_for_dev(int type, struct snd_card *card, int dev,
|
||||||
return minor;
|
return minor;
|
||||||
}
|
}
|
||||||
snd_minors[minor] = preg;
|
snd_minors[minor] = preg;
|
||||||
preg->dev = device_create_drvdata(sound_class, device,
|
preg->dev = device_create(sound_class, device, MKDEV(major, minor),
|
||||||
MKDEV(major, minor),
|
private_data, "%s", name);
|
||||||
private_data, "%s", name);
|
|
||||||
if (IS_ERR(preg->dev)) {
|
if (IS_ERR(preg->dev)) {
|
||||||
snd_minors[minor] = NULL;
|
snd_minors[minor] = NULL;
|
||||||
mutex_unlock(&sound_mutex);
|
mutex_unlock(&sound_mutex);
|
||||||
|
|
|
@ -560,19 +560,18 @@ static int __init oss_init(void)
|
||||||
sound_dmap_flag = (dmabuf > 0 ? 1 : 0);
|
sound_dmap_flag = (dmabuf > 0 ? 1 : 0);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(dev_list); i++) {
|
for (i = 0; i < ARRAY_SIZE(dev_list); i++) {
|
||||||
device_create_drvdata(sound_class, NULL,
|
device_create(sound_class, NULL,
|
||||||
MKDEV(SOUND_MAJOR, dev_list[i].minor),
|
MKDEV(SOUND_MAJOR, dev_list[i].minor), NULL,
|
||||||
NULL, "%s", dev_list[i].name);
|
"%s", dev_list[i].name);
|
||||||
|
|
||||||
if (!dev_list[i].num)
|
if (!dev_list[i].num)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (j = 1; j < *dev_list[i].num; j++)
|
for (j = 1; j < *dev_list[i].num; j++)
|
||||||
device_create_drvdata(sound_class, NULL,
|
device_create(sound_class, NULL,
|
||||||
MKDEV(SOUND_MAJOR,
|
MKDEV(SOUND_MAJOR,
|
||||||
dev_list[i].minor + (j*0x10)),
|
dev_list[i].minor + (j*0x10)),
|
||||||
NULL,
|
NULL, "%s%d", dev_list[i].name, j);
|
||||||
"%s%d", dev_list[i].name, j);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sound_nblocks >= 1024)
|
if (sound_nblocks >= 1024)
|
||||||
|
|
|
@ -220,9 +220,8 @@ static int sound_insert_unit(struct sound_unit **list, const struct file_operati
|
||||||
else
|
else
|
||||||
sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP);
|
sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP);
|
||||||
|
|
||||||
device_create_drvdata(sound_class, dev,
|
device_create(sound_class, dev, MKDEV(SOUND_MAJOR, s->unit_minor),
|
||||||
MKDEV(SOUND_MAJOR, s->unit_minor),
|
NULL, s->name+6);
|
||||||
NULL, s->name+6);
|
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
|
Loading…
Reference in a new issue