Skip to content

Commit 41899dc

Browse files
geertuglaubitz
authored andcommitted
sh: dma: Remove unused dmac_search_free_channel()
arch/sh/drivers/dma/dma-api.c:164:5: warning: no previous prototype for 'dmac_search_free_channel' [-Wmissing-prototypes] dmac_search_free_channel() never had a user in upstream, remove it. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: John Paul Adrian Glaubitz <[email protected]> Link: https://lore.kernel.org/r/82d5efdde44f9489c5a7d11d0a19750445116c95.1709326528.git.geert+renesas@glider.be Signed-off-by: John Paul Adrian Glaubitz <[email protected]>
1 parent 74feee2 commit 41899dc

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

arch/sh/drivers/dma/dma-api.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -161,33 +161,6 @@ int request_dma_bycap(const char **dmac, const char **caps, const char *dev_id)
161161
}
162162
EXPORT_SYMBOL(request_dma_bycap);
163163

164-
int dmac_search_free_channel(const char *dev_id)
165-
{
166-
struct dma_channel *channel = { 0 };
167-
struct dma_info *info = get_dma_info(0);
168-
int i;
169-
170-
for (i = 0; i < info->nr_channels; i++) {
171-
channel = &info->channels[i];
172-
if (unlikely(!channel))
173-
return -ENODEV;
174-
175-
if (atomic_read(&channel->busy) == 0)
176-
break;
177-
}
178-
179-
if (info->ops->request) {
180-
int result = info->ops->request(channel);
181-
if (result)
182-
return result;
183-
184-
atomic_set(&channel->busy, 1);
185-
return channel->chan;
186-
}
187-
188-
return -ENOSYS;
189-
}
190-
191164
int request_dma(unsigned int chan, const char *dev_id)
192165
{
193166
struct dma_channel *channel = { 0 };

0 commit comments

Comments
 (0)