Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196988
b: refs/heads/master
c: 7d4984d
h: refs/heads/master
v: v3
  • Loading branch information
Joe Perches authored and Greg Kroah-Hartman committed May 11, 2010
1 parent bf69b14 commit 5505140
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d241fd58e407cd3943cabd61217a0ae32c795c1d
refs/heads/master: 7d4984d8424182eba2774755ae2ae8145651e788
15 changes: 8 additions & 7 deletions trunk/drivers/staging/dt3155/allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@

#include <asm/page.h>

#include "allocator.h"

/*#define ALL_DEBUG*/
#define ALL_MSG "allocator: "

Expand All @@ -83,9 +85,9 @@
/*#define PDEBUGG(fmt, args...) printk( KERN_DEBUG ALL_MSG fmt, ## args)*/


int allocator_himem = 1; /* 0 = probe, pos. = megs, neg. = disable */
int allocator_step = 1; /* This is the step size in MB */
int allocator_probe = 1; /* This is a flag -- 1=probe, 0=don't probe */
static int allocator_himem = 1; /* 0 = probe, pos. = megs, neg. = disable */
static int allocator_step = 1; /* This is the step size in MB */
static int allocator_probe = 1; /* This is a flag -- 1=probe, 0=don't probe */

static unsigned long allocator_buffer; /* physical address */
static unsigned long allocator_buffer_size; /* kilobytes */
Expand All @@ -101,8 +103,7 @@ struct allocator_struct {
struct allocator_struct *next;
};

struct allocator_struct *allocator_list;

static struct allocator_struct *allocator_list;

#ifdef ALL_DEBUG
static int dump_list(void)
Expand All @@ -124,7 +125,7 @@ static int dump_list(void)
* be used straight ahead for DMA, but needs remapping for program use).
*/

unsigned long allocator_allocate_dma(unsigned long kilobytes, int prio)
unsigned long allocator_allocate_dma(unsigned long kilobytes, gfp_t flags)
{
struct allocator_struct *ptr = allocator_list, *newptr;
unsigned long bytes = kilobytes << 10;
Expand All @@ -147,7 +148,7 @@ unsigned long allocator_allocate_dma(unsigned long kilobytes, int prio)
PDEBUG("alloc failed\n");
return 0; /* end of list */
}
newptr = kmalloc(sizeof(struct allocator_struct), prio);
newptr = kmalloc(sizeof(struct allocator_struct), flags);
if (!newptr)
return 0;

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/dt3155/allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
*/

void allocator_free_dma(unsigned long address);
unsigned long allocator_allocate_dma(unsigned long kilobytes, int priority);
int allocator_free_dma(unsigned long address);
unsigned long allocator_allocate_dma(unsigned long kilobytes, gfp_t flags);
int allocator_init(u32 *);
void allocator_cleanup(void);

0 comments on commit 5505140

Please sign in to comment.