Skip to content

Commit

Permalink
staging: comedi: ni_labpc_cs: move comedi_driver declaration
Browse files Browse the repository at this point in the history
Move the comedi_driver declaration down in the file. This removes
the need for the forward declaration.

For aesthetic reasons, add some whitespace to the declaration and
remove the unnecessary '&' before the function names. They are
already addresses.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 30, 2013
1 parent b2e1be0 commit 6749ffa
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions drivers/staging/comedi/drivers/ni_labpc_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ NI manuals:

static struct pcmcia_device *pcmcia_cur_dev;

static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it);

static const struct labpc_board_struct labpc_cs_boards[] = {
{
.name = "daqcard-1200",
Expand Down Expand Up @@ -115,16 +113,6 @@ static const struct labpc_board_struct labpc_cs_boards[] = {
*/
#define thisboard ((const struct labpc_board_struct *)dev->board_ptr)

static struct comedi_driver driver_labpc_cs = {
.driver_name = "ni_labpc_cs",
.module = THIS_MODULE,
.attach = &labpc_attach,
.detach = &labpc_common_detach,
.num_names = ARRAY_SIZE(labpc_cs_boards),
.board_name = &labpc_cs_boards[0].name,
.offset = sizeof(struct labpc_board_struct),
};

static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
struct labpc_private *devpriv;
Expand Down Expand Up @@ -154,6 +142,16 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
return labpc_common_attach(dev, iobase, irq, 0);
}

static struct comedi_driver driver_labpc_cs = {
.driver_name = "ni_labpc_cs",
.module = THIS_MODULE,
.attach = labpc_attach,
.detach = labpc_common_detach,
.num_names = ARRAY_SIZE(labpc_cs_boards),
.board_name = &labpc_cs_boards[0].name,
.offset = sizeof(struct labpc_board_struct),
};

static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev,
void *priv_data)
{
Expand Down

0 comments on commit 6749ffa

Please sign in to comment.