mfd: ezx-pcap: Remove unused pcap_adc_sync
PATCH 1/1 mfd: ezx-pcap: Remove unused pcap_adc_sync
From: "Dr. David Alan Gilbert" <[email protected]>
pcap_adc_sync() was added in 2009 by
commit 13a09f93d2bf ("mfd: add PCAP driver")
but has remained unused; the async version is still used.
Remove it.
Signed-off-by Dr. David Alan Gilbert <[email protected]>
--- drivers/mfd/ezx-pcap.c | 33 --------------------------------- include/linux/mfd/ezx-pcap.h | 1 - 2 files changed, 34 deletions(-)
drivers/mfd/ezx-pcap.c +0 -33
@@ -25,11 +25,6 @@ struct pcap_adc_request {void *data; }; -struct pcap_adc_sync_request { -u16 res[2 ]; -struct completion completion; -}; -struct pcap_chip {struct spi_device *spi;
@@ -335,34 +330,6 @@ int pcap_adc_async(struct pcap_chip *pcap, u8 bank, u32 flags, u8 ch[], }EXPORT_SYMBOL_GPL (pcap_adc_async); -static void pcap_adc_sync_cb (void *param,u16 res[]) -{ -struct pcap_adc_sync_request *req = param; - - req->res[0 ] = res[0 ]; - req->res[1 ] = res[1 ]; -complete (&req->completion); -} - -int pcap_adc_sync (struct pcap_chip *pcap,u8 bank,u32 flags,u8 ch[], -u16 res[]) -{ -struct pcap_adc_sync_request sync_data; -int ret; - -init_completion (&sync_data.completion); - ret =pcap_adc_async (pcap, bank, flags, ch, pcap_adc_sync_cb, - &sync_data); -if (ret) -return ret; -wait_for_completion (&sync_data.completion); - res[0 ] = sync_data.res[0 ]; - res[1 ] = sync_data.res[1 ]; - -return 0 ; -} -EXPORT_SYMBOL_GPL (pcap_adc_sync); -/* subdevs */ static int pcap_remove_subdev (struct device *dev,void *unused) {
include/linux/mfd/ezx-pcap.h +0 -1
@@ -31,7 +31,6 @@ int ezx_pcap_set_bits(struct pcap_chip *, u8, u32, u32);int pcap_to_irq (struct pcap_chip *,int );int irq_to_pcap (struct pcap_chip *,int );int pcap_adc_async (struct pcap_chip *,u8 ,u32 ,u8 [],void *,void *); -int pcap_adc_sync (struct pcap_chip *,u8 ,u32 ,u8 [],u16 []);void pcap_set_ts_bits (struct pcap_chip *,u32 );#define PCAP_SECOND_PORT 1
Signature · 1 line
2.48.1
Re: (subset) [PATCH] mfd: ezx-pcap: Remove unused pcap_adc_sync
Quoted 8 lines · On Thu, 06 Mar 2025 01:10:27 +0000, [email protected] wrote:
pcap_adc_sync()was added in 2009 by
commit13a09f93d2bf("mfd: add PCAP driver")
but has remained unused; the async version is still used.Remove it.
[...]
Applied, thanks!
[1/1] mfd: ezx-pcap: Remove unused pcap_adc_sync
commit: 3c42bfbdf72e3004cf46bb9ec11f4a3ab4d65d9d
--
Lee Jones [李琼斯]