Commit 1f26cb92 authored by Takashi Iwai's avatar Takashi Iwai

Merge branch 'fix/misc' into for-linus

parents 2c3b9b50 db8cf334
This diff is collapsed.
......@@ -202,6 +202,7 @@
struct aaci_runtime {
void __iomem *base;
void __iomem *fifo;
spinlock_t lock;
struct ac97_pcm *pcm;
int pcm_open;
......@@ -232,7 +233,6 @@ struct aaci {
struct snd_ac97 *ac97;
u32 maincr;
spinlock_t lock;
struct aaci_runtime playback;
struct aaci_runtime capture;
......
......@@ -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)
......@@ -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)
......
......@@ -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;
......
......@@ -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
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......@@ -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)
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment