Skip to content

Commit 0d1217a

Browse files
Dr. David Alan Gilbertlag-linaro
authored andcommitted
mfd: ezx-pcap: Remove unused pcap_adc_sync
pcap_adc_sync() was added in 2009 by commit 13a09f9 ("mfd: add PCAP driver") but has remained unused; the async version is still used. Remove it. Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org> Link: https://lore.kernel.org/r/20250306011027.257021-1-linux@treblig.org Signed-off-by: Lee Jones <lee@kernel.org>
1 parent c105c55 commit 0d1217a

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

drivers/mfd/ezx-pcap.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ struct pcap_adc_request {
2525
void *data;
2626
};
2727

28-
struct pcap_adc_sync_request {
29-
u16 res[2];
30-
struct completion completion;
31-
};
32-
3328
struct pcap_chip {
3429
struct spi_device *spi;
3530

@@ -335,34 +330,6 @@ int pcap_adc_async(struct pcap_chip *pcap, u8 bank, u32 flags, u8 ch[],
335330
}
336331
EXPORT_SYMBOL_GPL(pcap_adc_async);
337332

338-
static void pcap_adc_sync_cb(void *param, u16 res[])
339-
{
340-
struct pcap_adc_sync_request *req = param;
341-
342-
req->res[0] = res[0];
343-
req->res[1] = res[1];
344-
complete(&req->completion);
345-
}
346-
347-
int pcap_adc_sync(struct pcap_chip *pcap, u8 bank, u32 flags, u8 ch[],
348-
u16 res[])
349-
{
350-
struct pcap_adc_sync_request sync_data;
351-
int ret;
352-
353-
init_completion(&sync_data.completion);
354-
ret = pcap_adc_async(pcap, bank, flags, ch, pcap_adc_sync_cb,
355-
&sync_data);
356-
if (ret)
357-
return ret;
358-
wait_for_completion(&sync_data.completion);
359-
res[0] = sync_data.res[0];
360-
res[1] = sync_data.res[1];
361-
362-
return 0;
363-
}
364-
EXPORT_SYMBOL_GPL(pcap_adc_sync);
365-
366333
/* subdevs */
367334
static int pcap_remove_subdev(struct device *dev, void *unused)
368335
{

include/linux/mfd/ezx-pcap.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ int ezx_pcap_set_bits(struct pcap_chip *, u8, u32, u32);
3131
int pcap_to_irq(struct pcap_chip *, int);
3232
int irq_to_pcap(struct pcap_chip *, int);
3333
int pcap_adc_async(struct pcap_chip *, u8, u32, u8[], void *, void *);
34-
int pcap_adc_sync(struct pcap_chip *, u8, u32, u8[], u16[]);
3534
void pcap_set_ts_bits(struct pcap_chip *, u32);
3635

3736
#define PCAP_SECOND_PORT 1

0 commit comments

Comments
 (0)