On Wed, Jun 17, 2015 at 03:22:14PM -0700, H Hartley Sweeten wrote: > Make this function return a pointer to the boardinfo instead of an index. > > For aesthetics, rename the function to ni_atmio_probe(). > > Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> > --- > drivers/staging/comedi/drivers/ni_atmio.c | 26 +++++++++++--------------- > 1 file changed, 11 insertions(+), 15 deletions(-) > > diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c > index 1304b06..b43b8ce 100644 > --- a/drivers/staging/comedi/drivers/ni_atmio.c > +++ b/drivers/staging/comedi/drivers/ni_atmio.c > @@ -274,14 +274,15 @@ static int ni_isapnp_find_board(struct pnp_dev **dev) > return 0; > } > > -static int ni_getboardtype(struct comedi_device *dev) > +static const struct ni_board_struct *ni_atmio_probe(struct comedi_device *dev) > { > int device_id = ni_read_eeprom(dev, 511); > int i; > > for (i = 0; i < ARRAY_SIZE(ni_boards); i++) { > - if (ni_boards[i].device_id == device_id) > - return i; > + const struct ni_board_struct *board = &ni_boards[i]; checkpatch is giving warning about missing blank line after declarataion. regards sudip _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel