staging: comedi: remove duplicate pointer assignments in attach functions
authorChristian Engelmayer <cengelma@gmx.at>
Sat, 26 Apr 2014 14:04:29 +0000 (16:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 May 2014 23:50:42 +0000 (19:50 -0400)
Some board pointer are assigned twice via comedi_board() in the comedi low
level driver attach functions. Remove the duplicate assignment from the
variable definition where the pointer is not used anyway until assigned later
in the function when dev->board_ptr, that comedi_board() relies on, is setup
correctly.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/das1800.c
drivers/staging/comedi/drivers/das800.c
drivers/staging/comedi/drivers/dt2801.c
drivers/staging/comedi/drivers/ni_at_a2150.c

index d581029146cb3de06d19b24ba12f3cc6ba49568e..0335a70a918bf0de0285446b7ee271a2f563facf 100644 (file)
@@ -1479,7 +1479,7 @@ static int das1800_probe(struct comedi_device *dev)
 static int das1800_attach(struct comedi_device *dev,
                          struct comedi_devconfig *it)
 {
-       const struct das1800_board *thisboard = comedi_board(dev);
+       const struct das1800_board *thisboard;
        struct das1800_private *devpriv;
        struct comedi_subdevice *s;
        unsigned int irq = it->options[1];
index b23a12ce765142f9ab897c4d34f9872dd68d2859..e2dc43dbdc5ea605c7ce130a0e2caa0c1d2cb031 100644 (file)
@@ -683,7 +683,7 @@ static int das800_probe(struct comedi_device *dev)
 
 static int das800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 {
-       const struct das800_board *thisboard = comedi_board(dev);
+       const struct das800_board *thisboard;
        struct das800_private *devpriv;
        struct comedi_subdevice *s;
        unsigned int irq = it->options[1];
index d4d4e4b497dcdbe6e1bc6dda4f32f26866901109..4263014426f83acfe7cbb9409cbad969cf3a2afb 100644 (file)
@@ -545,7 +545,7 @@ static int dt2801_dio_insn_config(struct comedi_device *dev,
 */
 static int dt2801_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 {
-       const struct dt2801_board *board = comedi_board(dev);
+       const struct dt2801_board *board;
        struct dt2801_private *devpriv;
        struct comedi_subdevice *s;
        int board_code, type;
index afbf251ba270676c9df8b5292f42209385282b23..fefd97e2344d3c86580b21aa05047f257bbe8025 100644 (file)
@@ -695,7 +695,7 @@ static int a2150_probe(struct comedi_device *dev)
 
 static int a2150_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 {
-       const struct a2150_board *thisboard = comedi_board(dev);
+       const struct a2150_board *thisboard;
        struct a2150_private *devpriv;
        struct comedi_subdevice *s;
        unsigned int irq = it->options[1];