diff options
Diffstat (limited to 'sound/core/sound.c')
-rw-r--r-- | sound/core/sound.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c index 65b66fa6f97e..62e057a94653 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c | |||
@@ -272,8 +272,9 @@ int snd_register_device_for_dev(int type, struct snd_card *card, int dev, | |||
272 | return minor; | 272 | return minor; |
273 | } | 273 | } |
274 | snd_minors[minor] = preg; | 274 | snd_minors[minor] = preg; |
275 | preg->dev = device_create(sound_class, device, MKDEV(major, minor), | 275 | preg->dev = device_create_drvdata(sound_class, device, |
276 | "%s", name); | 276 | MKDEV(major, minor), |
277 | private_data, "%s", name); | ||
277 | if (IS_ERR(preg->dev)) { | 278 | if (IS_ERR(preg->dev)) { |
278 | snd_minors[minor] = NULL; | 279 | snd_minors[minor] = NULL; |
279 | mutex_unlock(&sound_mutex); | 280 | mutex_unlock(&sound_mutex); |
@@ -282,9 +283,6 @@ int snd_register_device_for_dev(int type, struct snd_card *card, int dev, | |||
282 | return minor; | 283 | return minor; |
283 | } | 284 | } |
284 | 285 | ||
285 | if (preg->dev) | ||
286 | dev_set_drvdata(preg->dev, private_data); | ||
287 | |||
288 | mutex_unlock(&sound_mutex); | 286 | mutex_unlock(&sound_mutex); |
289 | return 0; | 287 | return 0; |
290 | } | 288 | } |