[media] videobuf: make unused exported functions static
The videobuf_dma_init* and videobuf_dma_map() functions are no longer used except in videobuf-dma-sg.c itself. Make them static. These functions were abused in various drivers. All those drivers have now been fixed, so by no longer exporting these functions future abuse is now prevented. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
58fc0461f6
commit
861360a56d
|
@ -145,12 +145,11 @@ struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(videobuf_to_dma);
|
EXPORT_SYMBOL_GPL(videobuf_to_dma);
|
||||||
|
|
||||||
void videobuf_dma_init(struct videobuf_dmabuf *dma)
|
static void videobuf_dma_init(struct videobuf_dmabuf *dma)
|
||||||
{
|
{
|
||||||
memset(dma, 0, sizeof(*dma));
|
memset(dma, 0, sizeof(*dma));
|
||||||
dma->magic = MAGIC_DMABUF;
|
dma->magic = MAGIC_DMABUF;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(videobuf_dma_init);
|
|
||||||
|
|
||||||
static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma,
|
static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma,
|
||||||
int direction, unsigned long data, unsigned long size)
|
int direction, unsigned long data, unsigned long size)
|
||||||
|
@ -195,7 +194,7 @@ static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction,
|
static int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction,
|
||||||
unsigned long data, unsigned long size)
|
unsigned long data, unsigned long size)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -206,9 +205,8 @@ int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction,
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(videobuf_dma_init_user);
|
|
||||||
|
|
||||||
int videobuf_dma_init_kernel(struct videobuf_dmabuf *dma, int direction,
|
static int videobuf_dma_init_kernel(struct videobuf_dmabuf *dma, int direction,
|
||||||
int nr_pages)
|
int nr_pages)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -267,9 +265,8 @@ out_free_pages:
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(videobuf_dma_init_kernel);
|
|
||||||
|
|
||||||
int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction,
|
static int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction,
|
||||||
dma_addr_t addr, int nr_pages)
|
dma_addr_t addr, int nr_pages)
|
||||||
{
|
{
|
||||||
dprintk(1, "init overlay [%d pages @ bus 0x%lx]\n",
|
dprintk(1, "init overlay [%d pages @ bus 0x%lx]\n",
|
||||||
|
@ -284,9 +281,8 @@ int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction,
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(videobuf_dma_init_overlay);
|
|
||||||
|
|
||||||
int videobuf_dma_map(struct device *dev, struct videobuf_dmabuf *dma)
|
static int videobuf_dma_map(struct device *dev, struct videobuf_dmabuf *dma)
|
||||||
{
|
{
|
||||||
MAGIC_CHECK(dma->magic, MAGIC_DMABUF);
|
MAGIC_CHECK(dma->magic, MAGIC_DMABUF);
|
||||||
BUG_ON(0 == dma->nr_pages);
|
BUG_ON(0 == dma->nr_pages);
|
||||||
|
@ -328,7 +324,6 @@ int videobuf_dma_map(struct device *dev, struct videobuf_dmabuf *dma)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(videobuf_dma_map);
|
|
||||||
|
|
||||||
int videobuf_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma)
|
int videobuf_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma)
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,16 +84,8 @@ struct videobuf_dma_sg_memory {
|
||||||
* Despite the name, this is totally unrelated to videobuf, except that
|
* Despite the name, this is totally unrelated to videobuf, except that
|
||||||
* videobuf-dma-sg uses the same API internally.
|
* videobuf-dma-sg uses the same API internally.
|
||||||
*/
|
*/
|
||||||
void videobuf_dma_init(struct videobuf_dmabuf *dma);
|
|
||||||
int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction,
|
|
||||||
unsigned long data, unsigned long size);
|
|
||||||
int videobuf_dma_init_kernel(struct videobuf_dmabuf *dma, int direction,
|
|
||||||
int nr_pages);
|
|
||||||
int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction,
|
|
||||||
dma_addr_t addr, int nr_pages);
|
|
||||||
int videobuf_dma_free(struct videobuf_dmabuf *dma);
|
int videobuf_dma_free(struct videobuf_dmabuf *dma);
|
||||||
|
|
||||||
int videobuf_dma_map(struct device *dev, struct videobuf_dmabuf *dma);
|
|
||||||
int videobuf_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma);
|
int videobuf_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma);
|
||||||
struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf);
|
struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue