diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-03-24 00:36:16 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-24 00:36:16 +0100 |
commit | 9fb5430c3d6e96a74fd4406dbe7608f36abb9987 (patch) | |
tree | 1c990d9f2f91f6daabbf2de957bea744dd2bcb71 /sound/oss | |
parent | 4c5ecb7e59662a76754efdd41c6ed4415e6e9840 (diff) | |
parent | e5bf48437370f3fc603e2dce12e8d3fb1a6a2457 (diff) | |
download | linux-3.10-9fb5430c3d6e96a74fd4406dbe7608f36abb9987.tar.gz linux-3.10-9fb5430c3d6e96a74fd4406dbe7608f36abb9987.tar.bz2 linux-3.10-9fb5430c3d6e96a74fd4406dbe7608f36abb9987.zip |
Merge branch 'topic/oss-fix' into for-linus
Diffstat (limited to 'sound/oss')
-rw-r--r-- | sound/oss/ad1848.c | 4 | ||||
-rw-r--r-- | sound/oss/dmabuf.c | 2 | ||||
-rw-r--r-- | sound/oss/pas2_card.c | 4 | ||||
-rw-r--r-- | sound/oss/pss.c | 12 | ||||
-rw-r--r-- | sound/oss/sequencer.c | 3 |
5 files changed, 11 insertions, 14 deletions
diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c index 7cf9913a47b..d12bd98a37b 100644 --- a/sound/oss/ad1848.c +++ b/sound/oss/ad1848.c @@ -280,7 +280,7 @@ static void wait_for_calibration(ad1848_info * devc) while (timeout > 0 && (ad_read(devc, 11) & 0x20)) timeout--; if (ad_read(devc, 11) & 0x20) - if ( (devc->model != MD_1845) || (devc->model != MD_1845_SSCAPE)) + if ((devc->model != MD_1845) && (devc->model != MD_1845_SSCAPE)) printk(KERN_WARNING "ad1848: Auto calibration timed out(3).\n"); } @@ -2107,7 +2107,7 @@ int ad1848_control(int cmd, int arg) switch (cmd) { case AD1848_SET_XTAL: /* Change clock frequency of AD1845 (only ) */ - if (devc->model != MD_1845 || devc->model != MD_1845_SSCAPE) + if (devc->model != MD_1845 && devc->model != MD_1845_SSCAPE) return -EINVAL; spin_lock_irqsave(&devc->lock,flags); ad_enter_MCE(devc); diff --git a/sound/oss/dmabuf.c b/sound/oss/dmabuf.c index 1e90d769b62..1bfcf7e8854 100644 --- a/sound/oss/dmabuf.c +++ b/sound/oss/dmabuf.c @@ -439,7 +439,7 @@ int DMAbuf_sync(int dev) DMAbuf_launch_output(dev, dmap); adev->dmap_out->flags |= DMA_SYNCING; adev->dmap_out->underrun_count = 0; - while (!signal_pending(current) && n++ <= adev->dmap_out->nbufs && + while (!signal_pending(current) && n++ < adev->dmap_out->nbufs && adev->dmap_out->qlen && adev->dmap_out->underrun_count == 0) { long t = dmabuf_timeout(dmap); spin_unlock_irqrestore(&dmap->lock,flags); diff --git a/sound/oss/pas2_card.c b/sound/oss/pas2_card.c index 25f3a22c52e..7f377ec3486 100644 --- a/sound/oss/pas2_card.c +++ b/sound/oss/pas2_card.c @@ -156,9 +156,7 @@ static int __init config_pas_hw(struct address_info *hw_config) * 0x80 */ , 0xB88); - pas_write(0x80 - | joystick?0x40:0 - ,0xF388); + pas_write(0x80 | (joystick ? 0x40 : 0), 0xF388); if (pas_irq < 0 || pas_irq > 15) { diff --git a/sound/oss/pss.c b/sound/oss/pss.c index 16ed06950dc..16517a5a130 100644 --- a/sound/oss/pss.c +++ b/sound/oss/pss.c @@ -457,10 +457,9 @@ static void pss_mixer_reset(pss_confdata *devc) } } -static int set_volume_mono(unsigned __user *p, int *aleft) +static int set_volume_mono(unsigned __user *p, unsigned int *aleft) { - int left; - unsigned volume; + unsigned int left, volume; if (get_user(volume, p)) return -EFAULT; @@ -471,10 +470,11 @@ static int set_volume_mono(unsigned __user *p, int *aleft) return 0; } -static int set_volume_stereo(unsigned __user *p, int *aleft, int *aright) +static int set_volume_stereo(unsigned __user *p, + unsigned int *aleft, + unsigned int *aright) { - int left, right; - unsigned volume; + unsigned int left, right, volume; if (get_user(volume, p)) return -EFAULT; diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c index 5c215f787ca..c79874696be 100644 --- a/sound/oss/sequencer.c +++ b/sound/oss/sequencer.c @@ -212,7 +212,6 @@ int sequencer_write(int dev, struct file *file, const char __user *buf, int coun { unsigned char event_rec[EV_SZ], ev_code; int p = 0, c, ev_size; - int err; int mode = translate_mode(file); dev = dev >> 4; @@ -285,7 +284,7 @@ int sequencer_write(int dev, struct file *file, const char __user *buf, int coun { if (!midi_opened[event_rec[2]]) { - int mode; + int err, mode; int dev = event_rec[2]; if (dev >= max_mididev || midi_devs[dev]==NULL) |