aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/control.c')
-rw-r--r--sound/core/control.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index f8f98cc52417..23561e74712b 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -1264,12 +1264,6 @@ static struct file_operations snd_ctl_f_ops =
1264 .fasync = snd_ctl_fasync, 1264 .fasync = snd_ctl_fasync,
1265}; 1265};
1266 1266
1267static struct snd_minor snd_ctl_reg =
1268{
1269 .comment = "ctl",
1270 .f_ops = &snd_ctl_f_ops,
1271};
1272
1273/* 1267/*
1274 * registration of the control device 1268 * registration of the control device
1275 */ 1269 */
@@ -1284,7 +1278,7 @@ static int snd_ctl_dev_register(struct snd_device *device)
1284 snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO); 1278 snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO);
1285 sprintf(name, "controlC%i", cardnum); 1279 sprintf(name, "controlC%i", cardnum);
1286 if ((err = snd_register_device(SNDRV_DEVICE_TYPE_CONTROL, 1280 if ((err = snd_register_device(SNDRV_DEVICE_TYPE_CONTROL,
1287 card, 0, &snd_ctl_reg, name)) < 0) 1281 card, -1, &snd_ctl_f_ops, name)) < 0)
1288 return err; 1282 return err;
1289 return 0; 1283 return 0;
1290} 1284}
@@ -1336,7 +1330,8 @@ static int snd_ctl_dev_unregister(struct snd_device *device)
1336 snd_assert(card != NULL, return -ENXIO); 1330 snd_assert(card != NULL, return -ENXIO);
1337 cardnum = card->number; 1331 cardnum = card->number;
1338 snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO); 1332 snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO);
1339 if ((err = snd_unregister_device(SNDRV_DEVICE_TYPE_CONTROL, card, 0)) < 0) 1333 if ((err = snd_unregister_device(SNDRV_DEVICE_TYPE_CONTROL,
1334 card, -1)) < 0)
1340 return err; 1335 return err;
1341 return snd_ctl_dev_free(device); 1336 return snd_ctl_dev_free(device);
1342} 1337}