Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: ezx-pcap: Remove unused pcap_adc_sync

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" <linux@treblig.org>
Link: https://lore.kernel.org/r/20250306011027.257021-1-linux@treblig.org
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Dr. David Alan Gilbert and committed by
Lee Jones
0d1217ab c105c555

-34
-33
drivers/mfd/ezx-pcap.c
··· 25 25 void *data; 26 26 }; 27 27 28 - struct pcap_adc_sync_request { 29 - u16 res[2]; 30 - struct completion completion; 31 - }; 32 - 33 28 struct pcap_chip { 34 29 struct spi_device *spi; 35 30 ··· 329 334 return 0; 330 335 } 331 336 EXPORT_SYMBOL_GPL(pcap_adc_async); 332 - 333 - static void pcap_adc_sync_cb(void *param, u16 res[]) 334 - { 335 - struct pcap_adc_sync_request *req = param; 336 - 337 - req->res[0] = res[0]; 338 - req->res[1] = res[1]; 339 - complete(&req->completion); 340 - } 341 - 342 - int pcap_adc_sync(struct pcap_chip *pcap, u8 bank, u32 flags, u8 ch[], 343 - u16 res[]) 344 - { 345 - struct pcap_adc_sync_request sync_data; 346 - int ret; 347 - 348 - init_completion(&sync_data.completion); 349 - ret = pcap_adc_async(pcap, bank, flags, ch, pcap_adc_sync_cb, 350 - &sync_data); 351 - if (ret) 352 - return ret; 353 - wait_for_completion(&sync_data.completion); 354 - res[0] = sync_data.res[0]; 355 - res[1] = sync_data.res[1]; 356 - 357 - return 0; 358 - } 359 - EXPORT_SYMBOL_GPL(pcap_adc_sync); 360 337 361 338 /* subdevs */ 362 339 static int pcap_remove_subdev(struct device *dev, void *unused)
-1
include/linux/mfd/ezx-pcap.h
··· 31 31 int pcap_to_irq(struct pcap_chip *, int); 32 32 int irq_to_pcap(struct pcap_chip *, int); 33 33 int pcap_adc_async(struct pcap_chip *, u8, u32, u8[], void *, void *); 34 - int pcap_adc_sync(struct pcap_chip *, u8, u32, u8[], u16[]); 35 34 void pcap_set_ts_bits(struct pcap_chip *, u32); 36 35 37 36 #define PCAP_SECOND_PORT 1