Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317308
b: refs/heads/master
c: 8b6c569
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jun 12, 2012
1 parent 0d5fdee commit 260b592
Show file tree
Hide file tree
Showing 104 changed files with 270 additions and 169 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: eea6838b1206b0ac90110f1a6f58e101aa496e99
refs/heads/master: 8b6c56949ffa83dbc2a6e8fa3f98b10a19372207
2 changes: 1 addition & 1 deletion trunk/drivers/staging/comedi/drivers/8255.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ static int dev_8255_attach(struct comedi_device *dev,
}

ret = comedi_alloc_subdevices(dev, i);
if (ret < 0)
if (ret)
return ret;

printk(KERN_INFO "comedi%d: 8255:", dev->minor);
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/staging/comedi/drivers/acl7225b.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ static int acl7225b_attach(struct comedi_device *dev,
const struct boardtype *board = comedi_board(dev);
struct comedi_subdevice *s;
int iobase, iorange;
int ret;

iobase = it->options[0];
iorange = board->io_range;
Expand All @@ -82,8 +83,9 @@ static int acl7225b_attach(struct comedi_device *dev,
dev->iobase = iobase;
dev->irq = 0;

if (comedi_alloc_subdevices(dev, 3) < 0)
return -ENOMEM;
ret = comedi_alloc_subdevices(dev, 3);
if (ret)
return ret;

s = dev->subdevices + 0;
/* Relays outputs */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
} else {
n_subdevices = 7;
ret = comedi_alloc_subdevices(dev, n_subdevices);
if (ret < 0)
if (ret)
return ret;

/* Allocate and Initialise AI Subdevice Structures */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev)
int n_subdevices = 9;

ret = comedi_alloc_subdevices(dev, n_subdevices);
if (ret < 0)
if (ret)
return;

/* Allocate and Initialise Timer Subdevice Structures */
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/staging/comedi/drivers/adl_pci6208.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,9 @@ static int pci6208_attach(struct comedi_device *dev,
dev->iobase = io_base;
dev->board_name = thisboard->name;

if (comedi_alloc_subdevices(dev, 2) < 0)
return -ENOMEM;
retval = comedi_alloc_subdevices(dev, 2);
if (retval)
return retval;

s = dev->subdevices + 0;
/* analog output subdevice */
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/staging/comedi/drivers/adl_pci7230.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ static int adl_pci7230_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
{
struct comedi_subdevice *s;
int ret;

printk(KERN_INFO "comedi%d: adl_pci7230\n", dev->minor);

Expand All @@ -116,8 +117,9 @@ static int adl_pci7230_attach(struct comedi_device *dev,
if (alloc_private(dev, sizeof(struct adl_pci7230_private)) < 0)
return -ENOMEM;

if (comedi_alloc_subdevices(dev, 2) < 0)
return -ENOMEM;
ret = comedi_alloc_subdevices(dev, 2);
if (ret)
return ret;

devpriv->pci_dev = adl_pci7230_find_pci(dev, it);
if (!devpriv->pci_dev)
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/staging/comedi/drivers/adl_pci7296.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ static int adl_pci7296_attach(struct comedi_device *dev,
if (alloc_private(dev, sizeof(struct adl_pci7296_private)) < 0)
return -ENOMEM;

if (comedi_alloc_subdevices(dev, 4) < 0)
return -ENOMEM;
ret = comedi_alloc_subdevices(dev, 4);
if (ret)
return ret;

devpriv->pci_dev = adl_pci7296_find_pci(dev, it);
if (!devpriv->pci_dev)
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/staging/comedi/drivers/adl_pci7432.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ static int adl_pci7432_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
{
struct comedi_subdevice *s;
int ret;

printk(KERN_INFO "comedi%d: attach adl_pci7432\n", dev->minor);

Expand All @@ -125,8 +126,9 @@ static int adl_pci7432_attach(struct comedi_device *dev,
if (alloc_private(dev, sizeof(struct adl_pci7432_private)) < 0)
return -ENOMEM;

if (comedi_alloc_subdevices(dev, 2) < 0)
return -ENOMEM;
ret = comedi_alloc_subdevices(dev, 2);
if (ret)
return ret;

devpriv->pci_dev = adl_pci7432_find_pci(dev, it);
if (!devpriv->pci_dev)
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/staging/comedi/drivers/adl_pci8164.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ static int adl_pci8164_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
{
struct comedi_subdevice *s;
int ret;

printk(KERN_INFO "comedi: attempt to attach...\n");
printk(KERN_INFO "comedi%d: adl_pci8164\n", dev->minor);
Expand All @@ -261,8 +262,9 @@ static int adl_pci8164_attach(struct comedi_device *dev,
if (alloc_private(dev, sizeof(struct adl_pci8164_private)) < 0)
return -ENOMEM;

if (comedi_alloc_subdevices(dev, 4) < 0)
return -ENOMEM;
ret = comedi_alloc_subdevices(dev, 4);
if (ret)
return ret;

devpriv->pci_dev = adl_pci8164_find_pci(dev, it);
if (!devpriv->pci_dev)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/comedi/drivers/adl_pci9111.c
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ static int pci9111_attach(struct comedi_device *dev,
/* TODO: Add external multiplexer setup (according to option[2]). */

error = comedi_alloc_subdevices(dev, 4);
if (error < 0)
if (error)
return error;

subdevice = dev->subdevices + 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/comedi/drivers/adl_pci9118.c
Original file line number Diff line number Diff line change
Expand Up @@ -2269,7 +2269,7 @@ static int pci9118_attach(struct comedi_device *dev,
/* Enable parity check for parity error */

ret = comedi_alloc_subdevices(dev, 4);
if (ret < 0)
if (ret)
return ret;

s = dev->subdevices + 0;
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/staging/comedi/drivers/adq12b.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
struct comedi_subdevice *s;
unsigned long iobase;
int unipolar, differential;
int ret;

iobase = it->options[0];
unipolar = it->options[1];
Expand Down Expand Up @@ -267,8 +268,9 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->last_channel = -1;
devpriv->last_range = -1;

if (comedi_alloc_subdevices(dev, 3) < 0)
return -ENOMEM;
ret = comedi_alloc_subdevices(dev, 3);
if (ret)
return ret;

s = dev->subdevices + 0;
/* analog input subdevice */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/comedi/drivers/adv_pci1710.c
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ static int pci1710_attach(struct comedi_device *dev,
n_subdevices++;

ret = comedi_alloc_subdevices(dev, n_subdevices);
if (ret < 0)
if (ret)
return ret;

pci1710_reset(dev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/comedi/drivers/adv_pci1723.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ static int pci1723_attach(struct comedi_device *dev,
n_subdevices++;

ret = comedi_alloc_subdevices(dev, n_subdevices);
if (ret < 0)
if (ret)
return ret;

pci1723_reset(dev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/comedi/drivers/adv_pci_dio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ static int pci_dio_attach(struct comedi_device *dev,
}

ret = comedi_alloc_subdevices(dev, n_subdevices);
if (ret < 0)
if (ret)
return ret;

subdev = 0;
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/staging/comedi/drivers/aio_aio12_8.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ static int aio_aio12_8_attach(struct comedi_device *dev,
const struct aio12_8_boardtype *board = comedi_board(dev);
int iobase;
struct comedi_subdevice *s;
int ret;

iobase = it->options[0];
if (!request_region(iobase, 24, "aio_aio12_8")) {
Expand All @@ -182,8 +183,9 @@ static int aio_aio12_8_attach(struct comedi_device *dev,
if (alloc_private(dev, sizeof(struct aio12_8_private)) < 0)
return -ENOMEM;

if (comedi_alloc_subdevices(dev, 3) < 0)
return -ENOMEM;
ret = comedi_alloc_subdevices(dev, 3);
if (ret)
return ret;

s = &dev->subdevices[0];
s->type = COMEDI_SUBD_AI;
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/staging/comedi/drivers/aio_iiro_16.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ static int aio_iiro_16_attach(struct comedi_device *dev,
const struct aio_iiro_16_board *board = comedi_board(dev);
int iobase;
struct comedi_subdevice *s;
int ret;

printk(KERN_INFO "comedi%d: aio_iiro_16: ", dev->minor);

Expand All @@ -124,8 +125,9 @@ static int aio_iiro_16_attach(struct comedi_device *dev,
if (alloc_private(dev, sizeof(struct aio_iiro_16_private)) < 0)
return -ENOMEM;

if (comedi_alloc_subdevices(dev, 2) < 0)
return -ENOMEM;
ret = comedi_alloc_subdevices(dev, 2);
if (ret)
return ret;

s = dev->subdevices + 0;
s->type = COMEDI_SUBD_DIO;
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/staging/comedi/drivers/amplc_dio200.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,9 +1273,11 @@ static int dio200_common_attach(struct comedi_device *dev, unsigned long iobase,
devpriv->intr_sd = -1;
dev->iobase = iobase;
dev->board_name = thisboard->name;

ret = comedi_alloc_subdevices(dev, layout->n_subdevs);
if (ret < 0)
if (ret)
return ret;

for (n = 0; n < dev->n_subdevices; n++) {
s = &dev->subdevices[n];
switch (layout->sdtype[n]) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/comedi/drivers/amplc_pc236.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ static int pc236_common_attach(struct comedi_device *dev, unsigned long iobase,
dev->iobase = iobase;

ret = comedi_alloc_subdevices(dev, 2);
if (ret < 0)
if (ret)
return ret;

s = dev->subdevices + 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/comedi/drivers/amplc_pc263.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ static int pc263_common_attach(struct comedi_device *dev, unsigned long iobase)
dev->iobase = iobase;

ret = comedi_alloc_subdevices(dev, 1);
if (ret < 0)
if (ret)
return ret;

s = dev->subdevices + 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/comedi/drivers/amplc_pci224.c
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@ static int pci224_attach_common(struct comedi_device *dev,
dev->iobase + PCI224_DACCON);

ret = comedi_alloc_subdevices(dev, 1);
if (ret < 0)
if (ret)
return ret;

s = dev->subdevices + 0;
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/staging/comedi/drivers/amplc_pci230.c
Original file line number Diff line number Diff line change
Expand Up @@ -2840,8 +2840,10 @@ static int pci230_attach_common(struct comedi_device *dev,
devpriv->pci_dev->irq);
}

if (comedi_alloc_subdevices(dev, 3) < 0)
return -ENOMEM;
rc = comedi_alloc_subdevices(dev, 3);
if (rc)
return rc;

s = dev->subdevices + 0;
/* analog input subdevice */
s->type = COMEDI_SUBD_AI;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/comedi/drivers/c6xdigio.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ static int c6xdigio_attach(struct comedi_device *dev,
dev->board_name = "c6xdigio";

result = comedi_alloc_subdevices(dev, 2);
if (result < 0)
if (result)
return result;

/* Make sure that PnP ports get activated */
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/staging/comedi/drivers/cb_das16_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ static int das16cs_attach(struct comedi_device *dev,
if (alloc_private(dev, sizeof(struct das16cs_private)) < 0)
return -ENOMEM;

if (comedi_alloc_subdevices(dev, 4) < 0)
return -ENOMEM;
ret = comedi_alloc_subdevices(dev, 4);
if (ret)
return ret;

s = dev->subdevices + 0;
dev->read_subdev = s;
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/staging/comedi/drivers/cb_pcidas.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ static int cb_pcidas_attach(struct comedi_device *dev,
struct pci_dev *pcidev = NULL;
int index;
int i;
int ret;

/*
* Allocate the private structure area.
Expand Down Expand Up @@ -614,8 +615,9 @@ static int cb_pcidas_attach(struct comedi_device *dev,
/* Initialize dev->board_name */
dev->board_name = thisboard->name;

if (comedi_alloc_subdevices(dev, 7) < 0)
return -ENOMEM;
ret = comedi_alloc_subdevices(dev, 7);
if (ret)
return ret;

s = dev->subdevices + 0;
/* analog input subdevice */
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/staging/comedi/drivers/cb_pcidas64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1344,9 +1344,11 @@ static int setup_subdevices(struct comedi_device *dev)
struct comedi_subdevice *s;
void __iomem *dio_8255_iobase;
int i;
int ret;

if (comedi_alloc_subdevices(dev, 10) < 0)
return -ENOMEM;
ret = comedi_alloc_subdevices(dev, 10);
if (ret)
return ret;

s = dev->subdevices + 0;
/* analog input subdevice */
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/staging/comedi/drivers/cb_pcidda.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ static int cb_pcidda_attach(struct comedi_device *dev,
struct comedi_subdevice *s;
struct pci_dev *pcidev = NULL;
int index;

int ret;

/*
* Allocate the private structure area.
Expand Down Expand Up @@ -333,8 +333,9 @@ static int cb_pcidda_attach(struct comedi_device *dev,
*/
dev->board_name = thisboard->name;

if (comedi_alloc_subdevices(dev, 3) < 0)
return -ENOMEM;
ret = comedi_alloc_subdevices(dev, 3);
if (ret)
return ret;

s = dev->subdevices + 0;
/* analog output subdevice */
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/staging/comedi/drivers/cb_pcidio.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ static int pcidio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
struct pci_dev *pcidev = NULL;
int index;
int i;
int ret;

/*
* Allocate the private structure area. alloc_private() is a
Expand Down Expand Up @@ -177,8 +178,9 @@ static int pcidio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
pci_resource_start(devpriv->pci_dev,
pcidio_boards[index].dioregs_badrindex);

if (comedi_alloc_subdevices(dev, thisboard->n_8255) < 0)
return -ENOMEM;
ret = comedi_alloc_subdevices(dev, thisboard->n_8255);
if (ret)
return ret;

for (i = 0; i < thisboard->n_8255; i++) {
subdev_8255_init(dev, dev->subdevices + i,
Expand Down
Loading

0 comments on commit 260b592

Please sign in to comment.