diff options
author | Laura Abbott <labbott@redhat.com> | 2016-08-08 12:52:54 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-15 10:38:43 -0400 |
commit | c7df077b6d6db8d3bed1d5de2707f3386198ae0d (patch) | |
tree | c6db8ddbefbb78450253688437a844d9c18ff643 | |
parent | 803394d03b43ba0ef4a9ed148de19c01d87cd13a (diff) |
staging: android: ion: Get rid of ion_sg_table
The ion_sg_table interface is mostly a reimplementation of
what dma_buf is doing. Clients should be using dma_buf APIs instead.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/android/ion/ion.c | 20 | ||||
-rw-r--r-- | drivers/staging/android/ion/ion.h | 11 |
2 files changed, 0 insertions, 31 deletions
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index a2cf93b59016..95b18acc8695 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c | |||
@@ -917,26 +917,6 @@ void ion_client_destroy(struct ion_client *client) | |||
917 | } | 917 | } |
918 | EXPORT_SYMBOL(ion_client_destroy); | 918 | EXPORT_SYMBOL(ion_client_destroy); |
919 | 919 | ||
920 | struct sg_table *ion_sg_table(struct ion_client *client, | ||
921 | struct ion_handle *handle) | ||
922 | { | ||
923 | struct ion_buffer *buffer; | ||
924 | struct sg_table *table; | ||
925 | |||
926 | mutex_lock(&client->lock); | ||
927 | if (!ion_handle_validate(client, handle)) { | ||
928 | pr_err("%s: invalid handle passed to map_dma.\n", | ||
929 | __func__); | ||
930 | mutex_unlock(&client->lock); | ||
931 | return ERR_PTR(-EINVAL); | ||
932 | } | ||
933 | buffer = handle->buffer; | ||
934 | table = buffer->sg_table; | ||
935 | mutex_unlock(&client->lock); | ||
936 | return table; | ||
937 | } | ||
938 | EXPORT_SYMBOL(ion_sg_table); | ||
939 | |||
940 | static void ion_buffer_sync_for_device(struct ion_buffer *buffer, | 920 | static void ion_buffer_sync_for_device(struct ion_buffer *buffer, |
941 | struct device *dev, | 921 | struct device *dev, |
942 | enum dma_data_direction direction); | 922 | enum dma_data_direction direction); |
diff --git a/drivers/staging/android/ion/ion.h b/drivers/staging/android/ion/ion.h index a1331fc169a1..225c34a20c67 100644 --- a/drivers/staging/android/ion/ion.h +++ b/drivers/staging/android/ion/ion.h | |||
@@ -149,17 +149,6 @@ int ion_phys(struct ion_client *client, struct ion_handle *handle, | |||
149 | ion_phys_addr_t *addr, size_t *len); | 149 | ion_phys_addr_t *addr, size_t *len); |
150 | 150 | ||
151 | /** | 151 | /** |
152 | * ion_map_dma - return an sg_table describing a handle | ||
153 | * @client: the client | ||
154 | * @handle: the handle | ||
155 | * | ||
156 | * This function returns the sg_table describing | ||
157 | * a particular ion handle. | ||
158 | */ | ||
159 | struct sg_table *ion_sg_table(struct ion_client *client, | ||
160 | struct ion_handle *handle); | ||
161 | |||
162 | /** | ||
163 | * ion_map_kernel - create mapping for the given handle | 152 | * ion_map_kernel - create mapping for the given handle |
164 | * @client: the client | 153 | * @client: the client |
165 | * @handle: handle to map | 154 | * @handle: handle to map |