public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: H Hartley Sweeten <hartleys@visionengravers.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: <devel@driverdev.osuosl.org>, <abbotti@mev.co.uk>,
	<fmhess@users.sourceforge.net>, <gregkh@linuxfoundation.org>
Subject: [PATCH 4/7] staging: comedi: das_08: remove the 8254 'logic2phys' usage
Date: Fri, 29 Jun 2012 11:00:40 -0700	[thread overview]
Message-ID: <201206291100.41204.hartleys@visionengravers.com> (raw)

The three 8254 timers have a 1:1 relationship to the comedi
channels. The 'logic2phys' usage just makes the driver more
complex.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/comedi/drivers/das08.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c
index c0c93ea..2ad66f2 100644
--- a/drivers/staging/comedi/drivers/das08.c
+++ b/drivers/staging/comedi/drivers/das08.c
@@ -448,7 +448,7 @@ static int das08_counter_read(struct comedi_device *dev,
 {
 	struct das08_private_struct *devpriv = dev->private;
 	struct i8254_struct *st = &devpriv->i8254;
-	int chan = st->logic2phys[insn->chanspec];
+	int chan = insn->chanspec;
 
 	data[0] = i8254_read(st->iobase, 0, chan);
 	return 1;
@@ -460,7 +460,7 @@ static int das08_counter_write(struct comedi_device *dev,
 {
 	struct das08_private_struct *devpriv = dev->private;
 	struct i8254_struct *st = &devpriv->i8254;
-	int chan = st->logic2phys[insn->chanspec];
+	int chan = insn->chanspec;
 
 	i8254_write(st->iobase, 0, chan, data[0]);
 	return 1;
@@ -472,7 +472,7 @@ static int das08_counter_config(struct comedi_device *dev,
 {
 	struct das08_private_struct *devpriv = dev->private;
 	struct i8254_struct *st = &devpriv->i8254;
-	int chan = st->logic2phys[insn->chanspec];
+	int chan = insn->chanspec;
 
 	if (insn->n != 2)
 		return -EINVAL;
@@ -848,9 +848,6 @@ int das08_common_attach(struct comedi_device *dev, unsigned long iobase)
 		s->insn_config = das08_counter_config;
 		/* Set-up the 8254 structure */
 		devpriv->i8254.channels = 3;
-		devpriv->i8254.logic2phys[0] = 0;
-		devpriv->i8254.logic2phys[1] = 1;
-		devpriv->i8254.logic2phys[2] = 2;
 		devpriv->i8254.iobase = iobase + thisboard->i8254_offset;
 		i8254_initialize(&devpriv->i8254);
 	} else {
-- 
1.7.11


                 reply	other threads:[~2012-06-29 18:00 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=201206291100.41204.hartleys@visionengravers.com \
    --to=hartleys@visionengravers.com \
    --cc=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=fmhess@users.sourceforge.net \
    --cc=gregkh@linuxfoundation.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