Diff for /src/sys/dev/sound/pcm/mixer.c between versions 1.6 and 1.7

version 1.6, 2004/05/19 22:52:50 version 1.7, 2004/05/21 01:14:27
Line 224  mixer_init(device_t dev, kobj_class_t cl Line 224  mixer_init(device_t dev, kobj_class_t cl
         mixer_setrecsrc(m, SOUND_MASK_MIC);          mixer_setrecsrc(m, SOUND_MASK_MIC);
   
         unit = device_get_unit(dev);          unit = device_get_unit(dev);
        cdevsw_add(&mixer_cdevsw, PCMMKMINOR(-1, 0, 0), PCMMKMINOR(unit, 0, 0));        cdevsw_add(&mixer_cdevsw, 
                     PCMMKMINOR(-1, -1, 0), PCMMKMINOR(unit, SND_DEV_CTL, 0));
         pdev = make_dev(&mixer_cdevsw, PCMMKMINOR(unit, SND_DEV_CTL, 0),          pdev = make_dev(&mixer_cdevsw, PCMMKMINOR(unit, SND_DEV_CTL, 0),
                  UID_ROOT, GID_WHEEL, 0666, "mixer%d", unit);                   UID_ROOT, GID_WHEEL, 0666, "mixer%d", unit);
         pdev->si_drv1 = m;          pdev->si_drv1 = m;
Line 242  int Line 243  int
 mixer_uninit(device_t dev)  mixer_uninit(device_t dev)
 {  {
         int i;          int i;
           int unit;
         struct snd_mixer *m;          struct snd_mixer *m;
         dev_t pdev;          dev_t pdev;
   
Line 256  mixer_uninit(device_t dev) Line 258  mixer_uninit(device_t dev)
   
         pdev->si_drv1 = NULL;          pdev->si_drv1 = NULL;
   
        /*        unit = device_get_unit(dev);
         * The mixer might be used by several entities, so we do not         cdevsw_remove(&mixer_cdevsw, 
         * want to remove the cdevsw here.  Destroy the device instead.                    PCMMKMINOR(-1, -1, 0), PCMMKMINOR(unit, SND_DEV_CTL, 0));
         * destroy_dev() requires a reference count. 
         */ 
        reference_dev(pdev); 
        destroy_dev(pdev); 
   
         for (i = 0; i < SOUND_MIXER_NRDEVICES; i++)          for (i = 0; i < SOUND_MIXER_NRDEVICES; i++)
                 mixer_set(m, i, 0);                  mixer_set(m, i, 0);

Removed from v.1.6  
changed lines
  Added in v.1.7