Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337092
b: refs/heads/master
c: 0e05c55
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Oct 22, 2012
1 parent 2bb2f4b commit b729250
Show file tree
Hide file tree
Showing 5 changed files with 181 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 843690b7d9c9cd4a2cc77e04ed610d100e599a15
refs/heads/master: 0e05c55226bffcdd3f1393d5ab74cd0d9faff385
11 changes: 7 additions & 4 deletions trunk/drivers/staging/comedi/drivers/ni_atmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,6 @@ struct ni_private {

};

#define devpriv ((struct ni_private *)dev->private)

/* How we access registers */

#define ni_writel(a, b) (outl((a), (b)+dev->iobase))
Expand All @@ -303,6 +301,7 @@ struct ni_private {

static void ni_atmio_win_out(struct comedi_device *dev, uint16_t data, int addr)
{
struct ni_private *devpriv = dev->private;
unsigned long flags;

spin_lock_irqsave(&devpriv->window_lock, flags);
Expand All @@ -317,6 +316,7 @@ static void ni_atmio_win_out(struct comedi_device *dev, uint16_t data, int addr)

static uint16_t ni_atmio_win_in(struct comedi_device *dev, int addr)
{
struct ni_private *devpriv = dev->private;
unsigned long flags;
uint16_t ret;

Expand Down Expand Up @@ -406,16 +406,17 @@ static int ni_getboardtype(struct comedi_device *dev)
static int ni_atmio_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
{
struct ni_private *devpriv;
struct pnp_dev *isapnp_dev;
int ret;
unsigned long iobase;
int board;
unsigned int irq;

/* allocate private area */
ret = ni_alloc_private(dev);
if (ret < 0)
if (ret)
return ret;
devpriv = dev->private;

devpriv->stc_writew = &ni_atmio_win_out;
devpriv->stc_readw = &ni_atmio_win_in;
Expand Down Expand Up @@ -499,6 +500,8 @@ static int ni_atmio_attach(struct comedi_device *dev,

static void ni_atmio_detach(struct comedi_device *dev)
{
struct ni_private *devpriv = dev->private;

mio_common_detach(dev);
if (dev->iobase)
release_region(dev->iobase, NI_SIZE);
Expand Down
Loading

0 comments on commit b729250

Please sign in to comment.