mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-27 18:18:27 +02:00
libubb/physmem.c (physmem_xlat): make "v" "const"
Since we may use the buffer as well for reading only, there is no point in pretending physmem_xlat itself would try to write to it.
This commit is contained in:
parent
8316bc0070
commit
c796ab1c54
@ -24,7 +24,8 @@ struct physmem_vec {
|
|||||||
|
|
||||||
void *physmem_malloc(size_t size);
|
void *physmem_malloc(size_t size);
|
||||||
void *physmem_calloc(size_t size);
|
void *physmem_calloc(size_t size);
|
||||||
int physmem_xlat(void *v, size_t len, struct physmem_vec *vec, int vec_len);
|
int physmem_xlat(const void *v, size_t len,
|
||||||
|
struct physmem_vec *vec, int vec_len);
|
||||||
int physmem_flush(const void *data, size_t size);
|
int physmem_flush(const void *data, size_t size);
|
||||||
|
|
||||||
#endif /* !UBB_PHYSMEM_H */
|
#endif /* !UBB_PHYSMEM_H */
|
||||||
|
@ -130,7 +130,8 @@ static unsigned long xlat_one(int fd, unsigned long vaddr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int physmem_xlat(void *v, size_t len, struct physmem_vec *vec, int vec_len)
|
int physmem_xlat(const void *v, size_t len,
|
||||||
|
struct physmem_vec *vec, int vec_len)
|
||||||
{
|
{
|
||||||
static int fd = -1;
|
static int fd = -1;
|
||||||
unsigned long vaddr = (unsigned long) v;
|
unsigned long vaddr = (unsigned long) v;
|
||||||
|
Loading…
Reference in New Issue
Block a user