提交 1ef64e67 编写于 作者: A Al Viro 提交者: Linus Torvalds

[PATCH] gfp_t: sound

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 87b750dc
...@@ -78,7 +78,7 @@ typedef struct { ...@@ -78,7 +78,7 @@ typedef struct {
const char *name2; const char *name2;
void (*open)(void); void (*open)(void);
void (*release)(void); void (*release)(void);
void *(*dma_alloc)(unsigned int, int); void *(*dma_alloc)(unsigned int, gfp_t);
void (*dma_free)(void *, unsigned int); void (*dma_free)(void *, unsigned int);
int (*irqinit)(void); int (*irqinit)(void);
#ifdef MODULE #ifdef MODULE
......
...@@ -318,7 +318,7 @@ struct cs_sound_settings { ...@@ -318,7 +318,7 @@ struct cs_sound_settings {
static struct cs_sound_settings sound; static struct cs_sound_settings sound;
static void *CS_Alloc(unsigned int size, int flags); static void *CS_Alloc(unsigned int size, gfp_t flags);
static void CS_Free(void *ptr, unsigned int size); static void CS_Free(void *ptr, unsigned int size);
static int CS_IrqInit(void); static int CS_IrqInit(void);
#ifdef MODULE #ifdef MODULE
...@@ -959,7 +959,7 @@ static TRANS transCSNormalRead = { ...@@ -959,7 +959,7 @@ static TRANS transCSNormalRead = {
/*** Low level stuff *********************************************************/ /*** Low level stuff *********************************************************/
static void *CS_Alloc(unsigned int size, int flags) static void *CS_Alloc(unsigned int size, gfp_t flags)
{ {
int order; int order;
......
...@@ -111,7 +111,7 @@ size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id); ...@@ -111,7 +111,7 @@ size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id);
int snd_dma_reserve_buf(struct snd_dma_buffer *dmab, unsigned int id); int snd_dma_reserve_buf(struct snd_dma_buffer *dmab, unsigned int id);
/* basic memory allocation functions */ /* basic memory allocation functions */
void *snd_malloc_pages(size_t size, unsigned int gfp_flags); void *snd_malloc_pages(size_t size, gfp_t gfp_flags);
void snd_free_pages(void *ptr, size_t size); void snd_free_pages(void *ptr, size_t size);
#endif /* __SOUND_MEMALLOC_H */ #endif /* __SOUND_MEMALLOC_H */
......
...@@ -190,7 +190,7 @@ static void unmark_pages(struct page *page, int order) ...@@ -190,7 +190,7 @@ static void unmark_pages(struct page *page, int order)
* *
* Returns the pointer of the buffer, or NULL if no enoguh memory. * Returns the pointer of the buffer, or NULL if no enoguh memory.
*/ */
void *snd_malloc_pages(size_t size, unsigned int gfp_flags) void *snd_malloc_pages(size_t size, gfp_t gfp_flags)
{ {
int pg; int pg;
void *res; void *res;
...@@ -235,7 +235,7 @@ static void *snd_malloc_dev_pages(struct device *dev, size_t size, dma_addr_t *d ...@@ -235,7 +235,7 @@ static void *snd_malloc_dev_pages(struct device *dev, size_t size, dma_addr_t *d
{ {
int pg; int pg;
void *res; void *res;
unsigned int gfp_flags; gfp_t gfp_flags;
snd_assert(size > 0, return NULL); snd_assert(size > 0, return NULL);
snd_assert(dma != NULL, return NULL); snd_assert(dma != NULL, return NULL);
......
...@@ -51,7 +51,7 @@ static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops, ...@@ -51,7 +51,7 @@ static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops,
gf1_wave_t *wp, *prev; gf1_wave_t *wp, *prev;
gf1_xwave_t xp; gf1_xwave_t xp;
int err; int err;
unsigned int gfp_mask; gfp_t gfp_mask;
unsigned int real_size; unsigned int real_size;
gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL; gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL;
...@@ -144,7 +144,8 @@ static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr, ...@@ -144,7 +144,8 @@ static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr,
snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data; snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data;
gf1_instrument_t *ip; gf1_instrument_t *ip;
gf1_xinstrument_t ix; gf1_xinstrument_t ix;
int err, gfp_mask; int err;
gfp_t gfp_mask;
if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE) if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE)
return -EINVAL; return -EINVAL;
......
...@@ -129,7 +129,7 @@ static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops, ...@@ -129,7 +129,7 @@ static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops,
iwffff_wave_t *wp, *prev; iwffff_wave_t *wp, *prev;
iwffff_xwave_t xp; iwffff_xwave_t xp;
int err; int err;
unsigned int gfp_mask; gfp_t gfp_mask;
unsigned int real_size; unsigned int real_size;
gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL; gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL;
...@@ -236,7 +236,7 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr, ...@@ -236,7 +236,7 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
iwffff_layer_t *lp, *prev_lp; iwffff_layer_t *lp, *prev_lp;
iwffff_xlayer_t lx; iwffff_xlayer_t lx;
int err; int err;
unsigned int gfp_mask; gfp_t gfp_mask;
if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE) if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE)
return -EINVAL; return -EINVAL;
......
...@@ -57,7 +57,8 @@ static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr, ...@@ -57,7 +57,8 @@ static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr,
snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data; snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data;
simple_instrument_t *ip; simple_instrument_t *ip;
simple_xinstrument_t ix; simple_xinstrument_t ix;
int err, gfp_mask; int err;
gfp_t gfp_mask;
unsigned int real_size; unsigned int real_size;
if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE) if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE)
......
...@@ -116,7 +116,7 @@ typedef struct { ...@@ -116,7 +116,7 @@ typedef struct {
const char *name; const char *name;
const char *name2; const char *name2;
struct module *owner; struct module *owner;
void *(*dma_alloc)(unsigned int, int); void *(*dma_alloc)(unsigned int, gfp_t);
void (*dma_free)(void *, unsigned int); void (*dma_free)(void *, unsigned int);
int (*irqinit)(void); int (*irqinit)(void);
#ifdef MODULE #ifdef MODULE
......
...@@ -114,7 +114,7 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, ...@@ -114,7 +114,7 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount,
/*** Low level stuff *********************************************************/ /*** Low level stuff *********************************************************/
static void *AtaAlloc(unsigned int size, int flags); static void *AtaAlloc(unsigned int size, gfp_t flags);
static void AtaFree(void *, unsigned int size); static void AtaFree(void *, unsigned int size);
static int AtaIrqInit(void); static int AtaIrqInit(void);
#ifdef MODULE #ifdef MODULE
...@@ -810,7 +810,7 @@ static TRANS transFalconExpanding = { ...@@ -810,7 +810,7 @@ static TRANS transFalconExpanding = {
* Atari (TT/Falcon) * Atari (TT/Falcon)
*/ */
static void *AtaAlloc(unsigned int size, int flags) static void *AtaAlloc(unsigned int size, gfp_t flags)
{ {
return atari_stram_alloc(size, "dmasound"); return atari_stram_alloc(size, "dmasound");
} }
......
...@@ -271,7 +271,7 @@ int expand_read_bal; /* Balance factor for expanding reads (not volume!) */ ...@@ -271,7 +271,7 @@ int expand_read_bal; /* Balance factor for expanding reads (not volume!) */
/*** Low level stuff *********************************************************/ /*** Low level stuff *********************************************************/
static void *PMacAlloc(unsigned int size, int flags); static void *PMacAlloc(unsigned int size, gfp_t flags);
static void PMacFree(void *ptr, unsigned int size); static void PMacFree(void *ptr, unsigned int size);
static int PMacIrqInit(void); static int PMacIrqInit(void);
#ifdef MODULE #ifdef MODULE
...@@ -614,7 +614,7 @@ tas_init_frame_rates(unsigned int *prop, unsigned int l) ...@@ -614,7 +614,7 @@ tas_init_frame_rates(unsigned int *prop, unsigned int l)
/* /*
* PCI PowerMac, with AWACS, Screamer, Burgundy, DACA or Tumbler and DBDMA. * PCI PowerMac, with AWACS, Screamer, Burgundy, DACA or Tumbler and DBDMA.
*/ */
static void *PMacAlloc(unsigned int size, int flags) static void *PMacAlloc(unsigned int size, gfp_t flags)
{ {
return kmalloc(size, flags); return kmalloc(size, flags);
} }
......
...@@ -69,7 +69,7 @@ static int write_sq_block_size_half, write_sq_block_size_quarter; ...@@ -69,7 +69,7 @@ static int write_sq_block_size_half, write_sq_block_size_quarter;
/*** Low level stuff *********************************************************/ /*** Low level stuff *********************************************************/
static void *AmiAlloc(unsigned int size, int flags); static void *AmiAlloc(unsigned int size, gfp_t flags);
static void AmiFree(void *obj, unsigned int size); static void AmiFree(void *obj, unsigned int size);
static int AmiIrqInit(void); static int AmiIrqInit(void);
#ifdef MODULE #ifdef MODULE
...@@ -317,7 +317,7 @@ static inline void StopDMA(void) ...@@ -317,7 +317,7 @@ static inline void StopDMA(void)
enable_heartbeat(); enable_heartbeat();
} }
static void *AmiAlloc(unsigned int size, int flags) static void *AmiAlloc(unsigned int size, gfp_t flags)
{ {
return amiga_chip_alloc((long)size, "dmasound [Paula]"); return amiga_chip_alloc((long)size, "dmasound [Paula]");
} }
......
...@@ -36,7 +36,7 @@ static int expand_data; /* Data for expanding */ ...@@ -36,7 +36,7 @@ static int expand_data; /* Data for expanding */
/*** Low level stuff *********************************************************/ /*** Low level stuff *********************************************************/
static void *Q40Alloc(unsigned int size, int flags); static void *Q40Alloc(unsigned int size, gfp_t flags);
static void Q40Free(void *, unsigned int); static void Q40Free(void *, unsigned int);
static int Q40IrqInit(void); static int Q40IrqInit(void);
#ifdef MODULE #ifdef MODULE
...@@ -358,7 +358,7 @@ static TRANS transQ40Compressing = { ...@@ -358,7 +358,7 @@ static TRANS transQ40Compressing = {
/*** Low level stuff *********************************************************/ /*** Low level stuff *********************************************************/
static void *Q40Alloc(unsigned int size, int flags) static void *Q40Alloc(unsigned int size, gfp_t flags)
{ {
return kmalloc(size, flags); /* change to vmalloc */ return kmalloc(size, flags); /* change to vmalloc */
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册