~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to sound/core/device.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
{
226
226
        struct snd_device *dev;
227
227
        int err;
228
 
        unsigned int range_low, range_high;
 
228
        unsigned int range_low, range_high, type;
229
229
 
230
230
        if (snd_BUG_ON(!card))
231
231
                return -ENXIO;
232
 
        range_low = cmd * SNDRV_DEV_TYPE_RANGE_SIZE;
 
232
        range_low = (__force unsigned int)cmd * SNDRV_DEV_TYPE_RANGE_SIZE;
233
233
        range_high = range_low + SNDRV_DEV_TYPE_RANGE_SIZE - 1;
234
234
      __again:
235
235
        list_for_each_entry(dev, &card->devices, list) {
236
 
                if (dev->type >= range_low && dev->type <= range_high) {
 
236
                type = (__force unsigned int)dev->type;
 
237
                if (type >= range_low && type <= range_high) {
237
238
                        if ((err = snd_device_free(card, dev->device_data)) < 0)
238
239
                                return err;
239
240
                        goto __again;