diff options
author | Nishka Dasgupta <nishkadg.linux@gmail.com> | 2019-07-01 12:30:25 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-03 18:28:28 +0200 |
commit | fd315da57dc37b7d9f3f145f88eb66085279d48a (patch) | |
tree | e7f4b294622128ab690ed2d81edd40aa482c0951 /drivers/staging/comedi | |
parent | 931282a9c7a6ea366c5a8a3c5a0f021681d19d9d (diff) | |
download | linux-fd315da57dc37b7d9f3f145f88eb66085279d48a.tar.gz linux-fd315da57dc37b7d9f3f145f88eb66085279d48a.tar.bz2 linux-fd315da57dc37b7d9f3f145f88eb66085279d48a.zip |
staging: comedi: mite: Replace function mite_request_channel_in_range()
Remove function mite_request_channel_in_range as all it does is call
__mite_request_channel.
Rename __mite_request_channel to mite_request_channel_in_range and
change its type from static to non-static to maintain compatibility with
call sites.
Change only remaining call site of __mite_request_channel to call
mite_request_channel_in_range_instead.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20190701070025.3838-3-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/mite.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/staging/comedi/drivers/mite.c b/drivers/staging/comedi/drivers/mite.c index 639ec1586976..cc9fc263573e 100644 --- a/drivers/staging/comedi/drivers/mite.c +++ b/drivers/staging/comedi/drivers/mite.c @@ -558,7 +558,14 @@ void mite_prep_dma(struct mite_channel *mite_chan, } EXPORT_SYMBOL_GPL(mite_prep_dma); -static struct mite_channel *__mite_request_channel(struct mite *mite, +/** + * mite_request_channel_in_range() - Request a MITE dma channel. + * @mite: MITE device. + * @ring: MITE dma ring. + * @min_channel: minimum channel index to use. + * @max_channel: maximum channel index to use. + */ +struct mite_channel *mite_request_channel_in_range(struct mite *mite, struct mite_ring *ring, unsigned int min_channel, unsigned int max_channel) @@ -583,21 +590,6 @@ static struct mite_channel *__mite_request_channel(struct mite *mite, spin_unlock_irqrestore(&mite->lock, flags); return mite_chan; } - -/** - * mite_request_channel_in_range() - Request a MITE dma channel. - * @mite: MITE device. - * @ring: MITE dma ring. - * @min_channel: minimum channel index to use. - * @max_channel: maximum channel index to use. - */ -struct mite_channel *mite_request_channel_in_range(struct mite *mite, - struct mite_ring *ring, - unsigned int min_channel, - unsigned int max_channel) -{ - return __mite_request_channel(mite, ring, min_channel, max_channel); -} EXPORT_SYMBOL_GPL(mite_request_channel_in_range); /** @@ -608,7 +600,8 @@ EXPORT_SYMBOL_GPL(mite_request_channel_in_range); struct mite_channel *mite_request_channel(struct mite *mite, struct mite_ring *ring) { - return __mite_request_channel(mite, ring, 0, mite->num_channels - 1); + return mite_request_channel_in_range(mite, ring, 0, + mite->num_channels - 1); } EXPORT_SYMBOL_GPL(mite_request_channel); |