Skip to content

Commit

Permalink
Merge branch 'fix/misc' into for-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Iwai committed Dec 21, 2009
2 parents 2c3b9b5 + db8cf33 commit 1f26cb9
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 132 deletions.
177 changes: 59 additions & 118 deletions sound/arm/aaci.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sound/arm/aaci.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
struct aaci_runtime {
void __iomem *base;
void __iomem *fifo;
spinlock_t lock;

struct ac97_pcm *pcm;
int pcm_open;
Expand Down Expand Up @@ -232,7 +233,6 @@ struct aaci {
struct snd_ac97 *ac97;

u32 maincr;
spinlock_t lock;

struct aaci_runtime playback;
struct aaci_runtime capture;
Expand Down
4 changes: 2 additions & 2 deletions sound/core/pcm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ int snd_interval_ratnum(struct snd_interval *i,
int diff;
if (q == 0)
q = 1;
den = div_down(num, q);
den = div_up(num, q);
if (den < rats[k].den_min)
continue;
if (den > rats[k].den_max)
Expand Down Expand Up @@ -794,7 +794,7 @@ int snd_interval_ratnum(struct snd_interval *i,
i->empty = 1;
return -EINVAL;
}
den = div_up(num, q);
den = div_down(num, q);
if (den > rats[k].den_max)
continue;
if (den < rats[k].den_min)
Expand Down
2 changes: 1 addition & 1 deletion sound/isa/msnd/msnd_midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ int snd_msndmidi_new(struct snd_card *card, int device)
err = snd_rawmidi_new(card, "MSND-MIDI", device, 1, 1, &rmidi);
if (err < 0)
return err;
mpu = kcalloc(1, sizeof(*mpu), GFP_KERNEL);
mpu = kzalloc(sizeof(*mpu), GFP_KERNEL);
if (mpu == NULL) {
snd_device_free(card, rmidi);
return -ENOMEM;
Expand Down
6 changes: 3 additions & 3 deletions sound/isa/sb/emu8000.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,6 @@ size_dram(struct snd_emu8000 *emu)

while (size < EMU8000_MAX_DRAM) {

size += 512 * 1024; /* increment 512kbytes */

/* Write a unique data on the test address.
* if the address is out of range, the data is written on
* 0x200000(=EMU8000_DRAM_OFFSET). Then the id word is
Expand All @@ -414,7 +412,9 @@ size_dram(struct snd_emu8000 *emu)
/*snd_emu8000_read_wait(emu);*/
EMU8000_SMLD_READ(emu); /* discard stale data */
if (EMU8000_SMLD_READ(emu) != UNIQUE_ID2)
break; /* we must have wrapped around */
break; /* no memory at this address */

size += 512 * 1024; /* increment 512kbytes */

snd_emu8000_read_wait(emu);

Expand Down
2 changes: 1 addition & 1 deletion sound/mips/sgio2audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ static int snd_sgio2audio_pcm_hw_params(struct snd_pcm_substream *substream,
/* alloc virtual 'dma' area */
if (runtime->dma_area)
vfree(runtime->dma_area);
runtime->dma_area = vmalloc(size);
runtime->dma_area = vmalloc_user(size);
if (runtime->dma_area == NULL)
return -ENOMEM;
runtime->dma_bytes = size;
Expand Down
6 changes: 3 additions & 3 deletions sound/oss/pss.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static int pss_reset_dsp(pss_confdata * devc)
unsigned long i, limit = jiffies + HZ/10;

outw(0x2000, REG(PSS_CONTROL));
for (i = 0; i < 32768 && (limit-jiffies >= 0); i++)
for (i = 0; i < 32768 && time_after_eq(limit, jiffies); i++)
inw(REG(PSS_CONTROL));
outw(0x0000, REG(PSS_CONTROL));
return 1;
Expand Down Expand Up @@ -369,11 +369,11 @@ static int pss_download_boot(pss_confdata * devc, unsigned char *block, int size
outw(0, REG(PSS_DATA));

limit = jiffies + HZ/10;
for (i = 0; i < 32768 && (limit - jiffies >= 0); i++)
for (i = 0; i < 32768 && time_after_eq(limit, jiffies); i++)
val = inw(REG(PSS_STATUS));

limit = jiffies + HZ/10;
for (i = 0; i < 32768 && (limit-jiffies >= 0); i++)
for (i = 0; i < 32768 && time_after_eq(limit, jiffies); i++)
{
val = inw(REG(PSS_STATUS));
if (val & 0x4000)
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -12924,7 +12924,7 @@ static int patch_alc268(struct hda_codec *codec)
int board_config;
int i, has_beep, err;

spec = kcalloc(1, sizeof(*spec), GFP_KERNEL);
spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL)
return -ENOMEM;

Expand Down
2 changes: 1 addition & 1 deletion sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t s
return 0; /* already enough large */
vfree(runtime->dma_area);
}
runtime->dma_area = vmalloc_32(size);
runtime->dma_area = vmalloc_32_user(size);
if (! runtime->dma_area)
return -ENOMEM;
runtime->dma_bytes = size;
Expand Down
2 changes: 1 addition & 1 deletion sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t s
return 0; /* already large enough */
vfree(runtime->dma_area);
}
runtime->dma_area = vmalloc(size);
runtime->dma_area = vmalloc_user(size);
if (!runtime->dma_area)
return -ENOMEM;
runtime->dma_bytes = size;
Expand Down

0 comments on commit 1f26cb9

Please sign in to comment.