diff options
Diffstat (limited to 'sound')
-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 812f91b3de5b..6c8ab48c689a 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c | |||
@@ -259,8 +259,9 @@ int snd_register_device_for_dev(int type, struct snd_card *card, int dev, | |||
259 | return minor; | 259 | return minor; |
260 | } | 260 | } |
261 | snd_minors[minor] = preg; | 261 | snd_minors[minor] = preg; |
262 | preg->dev = device_create(sound_class, device, MKDEV(major, minor), | 262 | preg->dev = device_create_drvdata(sound_class, device, |
263 | "%s", name); | 263 | MKDEV(major, minor), |
264 | private_data, "%s", name); | ||
264 | if (IS_ERR(preg->dev)) { | 265 | if (IS_ERR(preg->dev)) { |
265 | snd_minors[minor] = NULL; | 266 | snd_minors[minor] = NULL; |
266 | mutex_unlock(&sound_mutex); | 267 | mutex_unlock(&sound_mutex); |
@@ -269,9 +270,6 @@ int snd_register_device_for_dev(int type, struct snd_card *card, int dev, | |||
269 | return minor; | 270 | return minor; |
270 | } | 271 | } |
271 | 272 | ||
272 | if (preg->dev) | ||
273 | dev_set_drvdata(preg->dev, private_data); | ||
274 | |||
275 | mutex_unlock(&sound_mutex); | 273 | mutex_unlock(&sound_mutex); |
276 | return 0; | 274 | return 0; |
277 | } | 275 | } |