1
0
Fork 0

3.8: dma-buf minor updates

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJQ0rInAAoJEFErWKtxJpJdcmoIAIlizXwpmxDWc/rb4nLgXZAg
 btX4x/fltyydBIKJW2JcI32HVoPJIfrnejd01EWLUIQCrRIp0m4MjXdO6/sL9g9M
 /37BXs4zeDsiTS8oGw9fmR8siDUGVIA1AKZcDkK9n6qN1oqUL+NrUPn8qpQBWb1b
 WtU3ye95h9/hvDyr6RV2HjG+LOfQjKBdR2E+F1wfFxuc4E36FbmYcK+7UqPnBAS2
 e81ejFGJYrlsSl8HeBXX5e8jI2Y6PWGKbxywRoNXdfrvnCoufIUSKwardJKQKfYs
 w0xytKV8L4OqGTItydl81KjTs2tFoTCQLL0j9KpJukv1qxDYXU2mCkhpQXQwHLk=
 =N1OG
 -----END PGP SIGNATURE-----

Merge tag 'tag-for-linus-3.8' of git://git.linaro.org/people/sumitsemwal/linux-dma-buf

Pull dma-buf updates from Sumit Semwal:
 "A fairly small dma-buf pull request for 3.8 - only 2 patches"

* tag 'tag-for-linus-3.8' of git://git.linaro.org/people/sumitsemwal/linux-dma-buf:
  dma-buf: remove fallback for !CONFIG_DMA_SHARED_BUFFER
  dma-buf: might_sleep() in dma_buf_unmap_attachment()
hifive-unleashed-5.1
Linus Torvalds 2012-12-20 07:18:29 -08:00
commit ddedec28b1
2 changed files with 2 additions and 99 deletions

View File

@ -298,6 +298,8 @@ void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,
struct sg_table *sg_table,
enum dma_data_direction direction)
{
might_sleep();
if (WARN_ON(!attach || !attach->dmabuf || !sg_table))
return;

View File

@ -156,7 +156,6 @@ static inline void get_dma_buf(struct dma_buf *dmabuf)
get_file(dmabuf->file);
}
#ifdef CONFIG_DMA_SHARED_BUFFER
struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
struct device *dev);
void dma_buf_detach(struct dma_buf *dmabuf,
@ -184,103 +183,5 @@ int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *,
unsigned long);
void *dma_buf_vmap(struct dma_buf *);
void dma_buf_vunmap(struct dma_buf *, void *vaddr);
#else
static inline struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
struct device *dev)
{
return ERR_PTR(-ENODEV);
}
static inline void dma_buf_detach(struct dma_buf *dmabuf,
struct dma_buf_attachment *dmabuf_attach)
{
return;
}
static inline struct dma_buf *dma_buf_export(void *priv,
const struct dma_buf_ops *ops,
size_t size, int flags)
{
return ERR_PTR(-ENODEV);
}
static inline int dma_buf_fd(struct dma_buf *dmabuf, int flags)
{
return -ENODEV;
}
static inline struct dma_buf *dma_buf_get(int fd)
{
return ERR_PTR(-ENODEV);
}
static inline void dma_buf_put(struct dma_buf *dmabuf)
{
return;
}
static inline struct sg_table *dma_buf_map_attachment(
struct dma_buf_attachment *attach, enum dma_data_direction write)
{
return ERR_PTR(-ENODEV);
}
static inline void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,
struct sg_table *sg, enum dma_data_direction dir)
{
return;
}
static inline int dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
size_t start, size_t len,
enum dma_data_direction dir)
{
return -ENODEV;
}
static inline void dma_buf_end_cpu_access(struct dma_buf *dmabuf,
size_t start, size_t len,
enum dma_data_direction dir)
{
}
static inline void *dma_buf_kmap_atomic(struct dma_buf *dmabuf,
unsigned long pnum)
{
return NULL;
}
static inline void dma_buf_kunmap_atomic(struct dma_buf *dmabuf,
unsigned long pnum, void *vaddr)
{
}
static inline void *dma_buf_kmap(struct dma_buf *dmabuf, unsigned long pnum)
{
return NULL;
}
static inline void dma_buf_kunmap(struct dma_buf *dmabuf,
unsigned long pnum, void *vaddr)
{
}
static inline int dma_buf_mmap(struct dma_buf *dmabuf,
struct vm_area_struct *vma,
unsigned long pgoff)
{
return -ENODEV;
}
static inline void *dma_buf_vmap(struct dma_buf *dmabuf)
{
return NULL;
}
static inline void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr)
{
}
#endif /* CONFIG_DMA_SHARED_BUFFER */
#endif /* __DMA_BUF_H__ */