~ubuntu-branches/ubuntu/raring/linux-ti-omap4/raring-proposed

« back to all changes in this revision

Viewing changes to sound/core/hwdep.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati, Ubuntu: 3.5.0-22.34
  • Date: 2013-01-11 15:02:20 UTC
  • mfrom: (72.1.1 quantal-proposed)
  • Revision ID: package-import@ubuntu.com-20130111150220-kgmbtlwhyc4kwqhg
Tags: 3.5.0-217.25
* Release Tracking Bug
  - LP: #1097912

[ Paolo Pisati ]

* rebased on Ubuntu-3.5.0-22.34

[ Ubuntu: 3.5.0-22.34 ]

* Release Tracking Bug
  - LP: #1097343
* Revert "SAUCE: fsnotify: dont put marks on temporary list when clearing
  marks by group"
  - LP: #1096137
* Revert "SAUCE: fsnotify: introduce locked versions of
  fsnotify_add_mark() and fsnotify_remove_mark()"
  - LP: #1096137
* Revert "SAUCE: fsnotify: pass group to fsnotify_destroy_mark()"
  - LP: #1096137
* Revert "SAUCE: fsnotify: use a mutex instead of a spinlock to protect a
  groups mark list"
  - LP: #1096137
* Revert "SAUCE: fanotify: add an extra flag to mark_remove_from_mask
  that indicates wheather a mark should be destroyed"
  - LP: #1096137
* Revert "SAUCE: fsnotify: take groups mark_lock before mark lock"
  - LP: #1096137
* Revert "SAUCE: fsnotify: use reference counting for groups"
  - LP: #1096137
* Revert "SAUCE: fsnotify: introduce fsnotify_get_group()"
  - LP: #1096137
* fsnotify: introduce fsnotify_get_group()
  - LP: #1096137
* fsnotify: use reference counting for groups
  - LP: #1096137
* fsnotify: take groups mark_lock before mark lock
  - LP: #1096137
* fanotify: add an extra flag to mark_remove_from_mask that indicates
  wheather a mark should be destroyed
  - LP: #1096137
* fsnotify: use a mutex instead of a spinlock to protect a groups mark
  list
  - LP: #1096137
* fsnotify: pass group to fsnotify_destroy_mark()
  - LP: #1096137
* fsnotify: introduce locked versions of fsnotify_add_mark() and
  fsnotify_remove_mark()
  - LP: #1096137
* fsnotify: dont put marks on temporary list when clearing marks by group
  - LP: #1096137
* fsnotify: change locking order
  - LP: #1096137

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
        if (hw == NULL)
101
101
                return -ENODEV;
102
102
 
103
 
        if (!try_module_get(hw->card->module))
 
103
        if (!try_module_get(hw->card->module)) {
 
104
                snd_card_unref(hw->card);
104
105
                return -EFAULT;
 
106
        }
105
107
 
106
108
        init_waitqueue_entry(&wait, current);
107
109
        add_wait_queue(&hw->open_wait, &wait);
129
131
                mutex_unlock(&hw->open_mutex);
130
132
                schedule();
131
133
                mutex_lock(&hw->open_mutex);
 
134
                if (hw->card->shutdown) {
 
135
                        err = -ENODEV;
 
136
                        break;
 
137
                }
132
138
                if (signal_pending(current)) {
133
139
                        err = -ERESTARTSYS;
134
140
                        break;
148
154
        mutex_unlock(&hw->open_mutex);
149
155
        if (err < 0)
150
156
                module_put(hw->card->module);
 
157
        snd_card_unref(hw->card);
151
158
        return err;
152
159
}
153
160
 
459
466
                mutex_unlock(&register_mutex);
460
467
                return -EINVAL;
461
468
        }
 
469
        mutex_lock(&hwdep->open_mutex);
 
470
        wake_up(&hwdep->open_wait);
462
471
#ifdef CONFIG_SND_OSSEMUL
463
472
        if (hwdep->ossreg)
464
473
                snd_unregister_oss_device(hwdep->oss_type, hwdep->card, hwdep->device);
465
474
#endif
466
475
        snd_unregister_device(SNDRV_DEVICE_TYPE_HWDEP, hwdep->card, hwdep->device);
467
476
        list_del_init(&hwdep->list);
 
477
        mutex_unlock(&hwdep->open_mutex);
468
478
        mutex_unlock(&register_mutex);
469
479
        return 0;
470
480
}