staging: comedi: addi_common.c: remove included source file
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 14 Oct 2014 17:44:21 +0000 (10:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 07:48:53 +0000 (15:48 +0800)
The addi_apci_035 and addi_apci_1500 are the only drivers left that
include this source file. Copy the i_ADDIDATA_InsnReadEeprom() function
from that file to those drivers and remove the addi_common.c file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi-data/addi_common.c [deleted file]
drivers/staging/comedi/drivers/addi_apci_035.c
drivers/staging/comedi/drivers/addi_apci_1500.c

diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c
deleted file mode 100644 (file)
index 0143427..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
-@verbatim
-
-Copyright (C) 2004,2005  ADDI-DATA GmbH for the source code of this module.
-
-       ADDI-DATA GmbH
-       Dieselstrasse 3
-       D-77833 Ottersweier
-       Tel: +19(0)7223/9493-0
-       Fax: +49(0)7223/9493-92
-       http://www.addi-data.com
-       info@addi-data.com
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation; either version 2 of the License, or (at your option) any later
-version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-@endverbatim
-*/
-/*
-
-  +-----------------------------------------------------------------------+
-  | (C) ADDI-DATA GmbH          Dieselstrasse 3      D-77833 Ottersweier  |
-  +-----------------------------------------------------------------------+
-  | Tel : +49 (0) 7223/9493-0     | email    : info@addi-data.com         |
-  | Fax : +49 (0) 7223/9493-92    | Internet : http://www.addi-data.com   |
-  +-----------------------------------------------------------------------+
-  | Project   : ADDI DATA         | Compiler : GCC                        |
-  | Modulname : addi_common.c     | Version  : 2.96                       |
-  +-------------------------------+---------------------------------------+
-  | Author    :           | Date     :                                    |
-  +-----------------------------------------------------------------------+
-  | Description : ADDI COMMON Main Module                                 |
-  +-----------------------------------------------------------------------+
-*/
-
-static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev,
-                                    struct comedi_subdevice *s,
-                                    struct comedi_insn *insn,
-                                    unsigned int *data)
-{
-       const struct addi_board *this_board = dev->board_ptr;
-       struct addi_private *devpriv = dev->private;
-       unsigned short w_Address = CR_CHAN(insn->chanspec);
-       unsigned short w_Data;
-
-       w_Data = addi_eeprom_readw(devpriv->i_IobaseAmcc,
-               this_board->pc_EepromChip, 2 * w_Address);
-       data[0] = w_Data;
-
-       return insn->n;
-}
index a712cc522006a6838f7ccfc8326c6c0ef6196398..fd7d3f1d720500a5c1225bd16479e75b8ff08a56 100644 (file)
@@ -11,7 +11,6 @@
 
 #include "addi-data/addi_eeprom.c"
 #include "addi-data/hwdrv_apci035.c"
-#include "addi-data/addi_common.c"
 
 static const struct addi_board apci035_boardtypes[] = {
        {
@@ -35,6 +34,23 @@ static const struct addi_board apci035_boardtypes[] = {
        },
 };
 
+static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev,
+                                    struct comedi_subdevice *s,
+                                    struct comedi_insn *insn,
+                                    unsigned int *data)
+{
+       const struct addi_board *this_board = dev->board_ptr;
+       struct addi_private *devpriv = dev->private;
+       unsigned short w_Address = CR_CHAN(insn->chanspec);
+       unsigned short w_Data;
+
+       w_Data = addi_eeprom_readw(devpriv->i_IobaseAmcc,
+               this_board->pc_EepromChip, 2 * w_Address);
+       data[0] = w_Data;
+
+       return insn->n;
+}
+
 static int apci035_auto_attach(struct comedi_device *dev,
                               unsigned long context)
 {
index 857ac987646795dfb350ac59dcd50be7b5e21572..a68840e721a6044b0bf53670703e49baed3936f6 100644 (file)
@@ -9,7 +9,6 @@
 
 #include "addi-data/addi_eeprom.c"
 #include "addi-data/hwdrv_apci1500.c"
-#include "addi-data/addi_common.c"
 
 static const struct addi_board apci1500_boardtypes[] = {
        {
@@ -34,6 +33,23 @@ static const struct addi_board apci1500_boardtypes[] = {
        },
 };
 
+static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev,
+                                    struct comedi_subdevice *s,
+                                    struct comedi_insn *insn,
+                                    unsigned int *data)
+{
+       const struct addi_board *this_board = dev->board_ptr;
+       struct addi_private *devpriv = dev->private;
+       unsigned short w_Address = CR_CHAN(insn->chanspec);
+       unsigned short w_Data;
+
+       w_Data = addi_eeprom_readw(devpriv->i_IobaseAmcc,
+               this_board->pc_EepromChip, 2 * w_Address);
+       data[0] = w_Data;
+
+       return insn->n;
+}
+
 static int apci1500_auto_attach(struct comedi_device *dev,
                                unsigned long context)
 {