From: Hatim Muhammed <hatimmohammed369@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: greg@kroah.com, abbotti@mev.co.uk, hsweeten@visionengravers.com,
Hatim Muhammed <hatimmohammed369@gmail.com>
Subject: [PATCH 9/9] Removing unnecessary #if's
Date: Wed, 9 Mar 2022 11:17:35 +0200 [thread overview]
Message-ID: <20220309091735.13652-1-hatimmohammed369@gmail.com> (raw)
From: Hatim Muhammed <hatimmohammed369@gmail.com>
Removing two #if 0 and one #if 1
Signed-off-by: Hatim Muhammed <hatimmohammed369@gmail.com>
---
drivers/comedi/drivers/dt2801.c | 29 -----------------------------
1 file changed, 29 deletions(-)
diff --git a/drivers/comedi/drivers/dt2801.c b/drivers/comedi/drivers/dt2801.c
index 230d25010f58..71193426d6e0 100644
--- a/drivers/comedi/drivers/dt2801.c
+++ b/drivers/comedi/drivers/dt2801.c
@@ -87,17 +87,6 @@
#define DT2801_STATUS 1
#define DT2801_CMD 1
-#if 0
-/* ignore 'defined but not used' warning */
-static const struct comedi_lrange range_dt2801_ai_pgh_bipolar = {
- 4, {
- BIP_RANGE(10),
- BIP_RANGE(5),
- BIP_RANGE(2.5),
- BIP_RANGE(1.25)
- }
-};
-#endif
static const struct comedi_lrange range_dt2801_ai_pgl_bipolar = {
4, {
BIP_RANGE(10),
@@ -107,17 +96,6 @@ static const struct comedi_lrange range_dt2801_ai_pgl_bipolar = {
}
};
-#if 0
-/* ignore 'defined but not used' warning */
-static const struct comedi_lrange range_dt2801_ai_pgh_unipolar = {
- 4, {
- UNI_RANGE(10),
- UNI_RANGE(5),
- UNI_RANGE(2.5),
- UNI_RANGE(1.25)
- }
-};
-#endif
static const struct comedi_lrange range_dt2801_ai_pgl_unipolar = {
4, {
UNI_RANGE(10),
@@ -580,14 +558,7 @@ static int dt2801_attach(struct comedi_device *dev, struct comedi_devconfig *it)
/* ai subdevice */
s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | SDF_GROUND;
-#if 1
s->n_chan = n_ai_chans;
-#else
- if (it->options[2])
- s->n_chan = board->ad_chan;
- else
- s->n_chan = board->ad_chan / 2;
-#endif
s->maxdata = (1 << board->adbits) - 1;
s->range_table = ai_range_lkup(board->adrangetype, it->options[3]);
s->insn_read = dt2801_ai_insn_read;
--
2.35.1
reply other threads:[~2022-03-09 9:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220309091735.13652-1-hatimmohammed369@gmail.com \
--to=hatimmohammed369@gmail.com \
--cc=abbotti@mev.co.uk \
--cc=greg@kroah.com \
--cc=hsweeten@visionengravers.com \
--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®