From: linux@treblig.org
To: lee@kernel.org
Cc: linux-kernel@vger.kernel.org,
"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH] mfd: ezx-pcap: Remove unused pcap_adc_sync
Date: Thu, 6 Mar 2025 01:10:27 +0000 [thread overview]
Message-ID: <20250306011027.257021-1-linux@treblig.org> (raw)
From: "Dr. David Alan Gilbert" <linux@treblig.org>
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>
---
drivers/mfd/ezx-pcap.c | 33 ---------------------------------
include/linux/mfd/ezx-pcap.h | 1 -
2 files changed, 34 deletions(-)
diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 8d006f6be48c..1be4557b7bdd 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -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)
{
diff --git a/include/linux/mfd/ezx-pcap.h b/include/linux/mfd/ezx-pcap.h
index ffde195e12b7..ea51b1cdca5a 100644
--- a/include/linux/mfd/ezx-pcap.h
+++ b/include/linux/mfd/ezx-pcap.h
@@ -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
--
2.48.1
next reply other threads:[~2025-03-06 1:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 1:10 linux [this message]
2025-03-13 14:50 ` (subset) " Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250306011027.257021-1-linux@treblig.org \
--to=linux@treblig.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®