Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5375764f authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Sumit Semwal
Browse files

dma-buf: Constify ops argument to dma_buf_export()



This allows drivers to make the dma buf operations structure constant.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
parent c16fa4f2
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -71,7 +71,7 @@ static inline int is_dma_buf_file(struct file *file)
 * ops, or error in allocating struct dma_buf, will return negative error.
 * ops, or error in allocating struct dma_buf, will return negative error.
 *
 *
 */
 */
struct dma_buf *dma_buf_export(void *priv, struct dma_buf_ops *ops,
struct dma_buf *dma_buf_export(void *priv, const struct dma_buf_ops *ops,
				size_t size, int flags)
				size_t size, int flags)
{
{
	struct dma_buf *dmabuf;
	struct dma_buf *dmabuf;
+4 −4
Original line number Original line Diff line number Diff line
@@ -114,7 +114,7 @@ struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
							struct device *dev);
							struct device *dev);
void dma_buf_detach(struct dma_buf *dmabuf,
void dma_buf_detach(struct dma_buf *dmabuf,
				struct dma_buf_attachment *dmabuf_attach);
				struct dma_buf_attachment *dmabuf_attach);
struct dma_buf *dma_buf_export(void *priv, struct dma_buf_ops *ops,
struct dma_buf *dma_buf_export(void *priv, const struct dma_buf_ops *ops,
			       size_t size, int flags);
			       size_t size, int flags);
int dma_buf_fd(struct dma_buf *dmabuf);
int dma_buf_fd(struct dma_buf *dmabuf);
struct dma_buf *dma_buf_get(int fd);
struct dma_buf *dma_buf_get(int fd);
@@ -138,7 +138,7 @@ static inline void dma_buf_detach(struct dma_buf *dmabuf,
}
}


static inline struct dma_buf *dma_buf_export(void *priv,
static inline struct dma_buf *dma_buf_export(void *priv,
						struct dma_buf_ops *ops,
					     const struct dma_buf_ops *ops,
					     size_t size, int flags)
					     size_t size, int flags)
{
{
	return ERR_PTR(-ENODEV);
	return ERR_PTR(-ENODEV);