Got rid of unnecessary casts when initializing comedi_driver.board_name
authorFrank Mori Hess <fmhess@speakeasy.net>
Mon, 16 Jul 2007 19:26:52 +0000 (19:26 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Mon, 16 Jul 2007 19:26:52 +0000 (19:26 +0000)
55 files changed:
comedi/drivers.c
comedi/drivers/acl7225b.c
comedi/drivers/adl_pci7296.c
comedi/drivers/adl_pci7432.c
comedi/drivers/adl_pci8164.c
comedi/drivers/adl_pci9111.c
comedi/drivers/adl_pci9118.c
comedi/drivers/adv_pci1710.c
comedi/drivers/adv_pci_dio.c
comedi/drivers/aio_aio12_8.c
comedi/drivers/aio_iiro_16.c
comedi/drivers/amplc_dio200.c
comedi/drivers/amplc_pc236.c
comedi/drivers/amplc_pc263.c
comedi/drivers/amplc_pci224.c
comedi/drivers/amplc_pci230.c
comedi/drivers/comedi_bond.c
comedi/drivers/comedi_test.c
comedi/drivers/das08.c
comedi/drivers/das08_cs.c
comedi/drivers/das16.c
comedi/drivers/das16m1.c
comedi/drivers/das1800.c
comedi/drivers/das800.c
comedi/drivers/dmm32at.c
comedi/drivers/dt2811.c
comedi/drivers/dt282x.c
comedi/drivers/icp_multi.c
comedi/drivers/me_daq.c
comedi/drivers/ni_at_ao.c
comedi/drivers/ni_atmio16d.c
comedi/drivers/ni_daq_dio24.c
comedi/drivers/ni_labpc.c
comedi/drivers/ni_labpc.h
comedi/drivers/ni_labpc_cs.c
comedi/drivers/ni_pcidio.c
comedi/drivers/pcl711.c
comedi/drivers/pcl724.c
comedi/drivers/pcl726.c
comedi/drivers/pcl730.c
comedi/drivers/pcl812.c
comedi/drivers/pcl816.c
comedi/drivers/pcl818.c
comedi/drivers/pcm3724.c
comedi/drivers/pcmad.c
comedi/drivers/pcmda12.c
comedi/drivers/pcmmio.c
comedi/drivers/pcmuio.c
comedi/drivers/poc.c
comedi/drivers/rtd520.c
comedi/drivers/rti800.c
comedi/drivers/s526.c
comedi/drivers/skel.c
comedi/drivers/ssv_dnp.c
include/linux/comedidev.h

index 8dd1c77025c2e6efcd117d925173f7fb6ca8b9c9..be47412dec6821ece3cb896964fd6a49538e0578 100644 (file)
@@ -321,12 +321,12 @@ static int postconfig(comedi_device *dev)
 void *comedi_recognize(comedi_driver *driv, const char *name)
 {
        unsigned i;
-       const char **name_ptr = driv->board_name;
+       const char * const *name_ptr = driv->board_name;
        for(i = 0; i < driv->num_names; i++)
        {
                if(strcmp(*name_ptr, name) == 0)
-                       return name_ptr;
-               name_ptr = (const char **)((char *)name_ptr + driv->offset);
+                       return (void*)name_ptr;
+               name_ptr = (const char * const *)((const char *)name_ptr + driv->offset);
        }
 
        return NULL;
@@ -335,7 +335,7 @@ void *comedi_recognize(comedi_driver *driv, const char *name)
 void comedi_report_boards(comedi_driver *driv)
 {
        unsigned int i;
-       const char **name_ptr;
+       const char * const *name_ptr;
 
        printk("comedi: valid board names for %s driver are:\n", driv->driver_name);
 
index e550c3eb8205f4be63a26ca688daa21995abf4cb..3cdb48f0be8ed5d54f7350672bfd03a22bdbbc2f 100644 (file)
@@ -25,7 +25,7 @@ static int acl7225b_attach(comedi_device *dev,comedi_devconfig *it);
 static int acl7225b_detach(comedi_device *dev);
 
 typedef struct {
-       char    *name;          // driver name
+       const char      *name;          // driver name
        int             io_range;       // len of I/O space
 } boardtype;
 
@@ -42,7 +42,7 @@ static comedi_driver driver_acl7225b = {
        module:         THIS_MODULE,
        attach:         acl7225b_attach,
        detach:         acl7225b_detach,
-       board_name: (const char**)boardtypes,
+       board_name: &boardtypes[0].name,
        num_names:      n_boardtypes,
        offset:         sizeof(boardtype),
 };
index 106c4d60a5dcdad1ea18e3ad9e6d126560c43c29..8301c2834f5b11ed6acbf92533d2273541bdde2a 100644 (file)
@@ -48,7 +48,7 @@ Configuration Options:
 
 
 typedef struct skel_board_struct{
-       char *name;
+       const char *name;
        int vendor_id;
        int device_id;
 }adl_pci7296_board;
@@ -80,7 +80,7 @@ static comedi_driver driver_adl_pci7296={
        attach:         adl_pci7296_attach,
        detach:         adl_pci7296_detach,
 
-       board_name:     (const char**)adl_pci7296_boards,
+       board_name:     &adl_pci7296_boards[0].name,
        offset:         sizeof(adl_pci7296_board),
        num_names:      sizeof(adl_pci7296_boards) / sizeof(adl_pci7296_board),
 };
index 32075728083d7f3e2421c2cb55e3db5eda6c5769..65291f10acb0cde197533ae99f99573bafc8d22e 100644 (file)
@@ -40,7 +40,7 @@ Configuration Options:
 #define PCI_DEVICE_ID_PCI7432 0x7432
 
 typedef struct {
-       char *name;
+       const char *name;
        int  vendor_id;
        int  device_id;
 } adl_pci7432_board;
@@ -72,7 +72,7 @@ static comedi_driver driver_adl_pci7432={
        attach:         adl_pci7432_attach,
        detach:         adl_pci7432_detach,
        num_names:  1,
-       board_name: (const char**)adl_pci7432_boards,
+       board_name: &adl_pci7432_boards[0].name,
        offset:     sizeof(adl_pci7432_board),
 };
 
index 863397dc5cc88226c3abc758ee718d03c63fc135..b0bf682de8580977524e24963033e557d4013580 100644 (file)
@@ -52,7 +52,7 @@ Configuration Options:
 #define PCI_DEVICE_ID_PCI8164 0x8164
 
 typedef struct {
-       char *name;
+       const char *name;
        int  vendor_id;
        int  device_id;
 } adl_pci8164_board;
@@ -84,7 +84,7 @@ static comedi_driver driver_adl_pci8164={
        attach:         adl_pci8164_attach,
        detach:         adl_pci8164_detach,
        num_names:  1,
-       board_name: (const char**)adl_pci8164_boards,
+       board_name: &adl_pci8164_boards[0].name,
        offset:     sizeof(adl_pci8164_board),
 };
 
index 97695d8466fa303ba06bdd35b108bd548a84240d..dedc8560e30f9668cfcdde84ef51752d0d27c6c6 100644 (file)
@@ -294,7 +294,7 @@ MODULE_DEVICE_TABLE(pci, pci9111_pci_table);
 //
 
 typedef struct {
-  char                 *name;                  // driver name
+  const char           *name;                  // driver name
   int          device_id;
   int          ai_channel_nbr;         // num of A/D chans
   int          ao_channel_nbr;         // num of D/A chans
@@ -335,7 +335,7 @@ static comedi_driver pci9111_driver=
        attach: pci9111_attach,
        detach: pci9111_detach,
        num_names:      pci9111_board_nbr,
-       board_name: (const char**)pci9111_boards,
+       board_name: &pci9111_boards[0].name,
        offset: sizeof(pci9111_board_struct),
 };
 COMEDI_INITCLEANUP(pci9111_driver);
index ba8b380a50f9a3114d80f534f18e5b16a0031dde..ce27734643fff607482326e61f013964ae87f695 100644 (file)
@@ -182,7 +182,7 @@ static int pci9118_attach(comedi_device *dev,comedi_devconfig *it);
 static int pci9118_detach(comedi_device *dev);
 
 typedef struct {
-       char            *name;          // driver name
+       const char              *name;          // board name
        int             vendor_id;      // PCI vendor a device ID of card
        int             device_id;
        int             iorange_amcc;   // iorange for own S5933 region
@@ -235,7 +235,7 @@ static comedi_driver driver_pci9118={
        attach:         pci9118_attach,
        detach:         pci9118_detach,
        num_names:      n_boardtypes,
-       board_name: (const char**)boardtypes,
+       board_name: &boardtypes[0].name,
        offset:         sizeof(boardtype),
 };
 COMEDI_INITCLEANUP(driver_pci9118);
index 731e0490445aca638a8078a6ee74a068fac0085c..a46a499aadc73ff9e90be39f1caacbbcfe264585 100644 (file)
@@ -183,7 +183,7 @@ static int pci1710_attach(comedi_device *dev,comedi_devconfig *it);
 static int pci1710_detach(comedi_device *dev);
 
 typedef struct {
-       char            *name;          // driver name
+       const  char             *name;          // board name
        int             device_id;
        int             iorange;        // I/O range len
        char            have_irq;       // 1=card support IRQ
@@ -255,7 +255,7 @@ static comedi_driver driver_pci1710={
        attach:         pci1710_attach,
        detach:         pci1710_detach,
        num_names:      n_boardtypes,
-       board_name: (const char**)boardtypes,
+       board_name: &boardtypes[0].name,
        offset:         sizeof(boardtype),
 };
 
index 22594b946f11ea7ec55f66d0c82a8e7e5ecec3fe..9c9f1e49396f1ff4feab75cc602fa2b92abf43f7 100644 (file)
@@ -185,7 +185,7 @@ typedef struct {
 } diosubd_data;
 
 typedef struct {
-       char            *name;          // driver name
+       const char              *name;          // board name
        int             vendor_id;      // vendor/device PCI ID
        int             device_id;
        int             main_pci_region;// main I/O OCI region
@@ -321,7 +321,7 @@ static comedi_driver driver_pci_dio={
        attach:         pci_dio_attach,
        detach:         pci_dio_detach,
        num_names:      n_boardtypes,
-       board_name: (const char**)boardtypes,
+       board_name: &boardtypes[0].name,
        offset:         sizeof(boardtype),
 };
 typedef struct pci_dio_private_st pci_dio_private;
index a0bffda128f0e55068d96890b691a355d9f716c9..34573c8fe9169fbcc64d850f8e6914fb60d3373e 100644 (file)
@@ -73,7 +73,7 @@ Notes:
 
 typedef struct
 {
-       char *name;
+       const char *name;
 } board_type;
 
 static board_type board_types[] =
@@ -230,7 +230,7 @@ static comedi_driver driver_aio_aio12_8 =
        module:         THIS_MODULE,
        attach:         aio_aio12_8_attach,
        detach:         aio_aio12_8_detach,
-       board_name:     (const char**)board_types,
+       board_name:     &board_types[0].name,
        num_names:      1,
        offset:         sizeof (board_type),
 };
index d2b8de1c22e4bcad218afb0371f322cb1802f01d..6ea8d210a17dda7fe94a7cabbc6c4df8ca26a6e5 100644 (file)
@@ -45,7 +45,7 @@ Configuration Options:
 
 typedef struct aio_iiro_16_board_struct
 {
-       char *name;
+       const char *name;
        int do_;
        int di;
 } aio_iiro_16_board;
@@ -81,7 +81,7 @@ static comedi_driver driver_aio_iiro_16 =
        module:         THIS_MODULE,
        attach:         aio_iiro_16_attach,
        detach:         aio_iiro_16_detach,
-       board_name:     (const char**)aio_iiro_16_boards,
+       board_name:     &aio_iiro_16_boards[0].name,
        offset:         sizeof (aio_iiro_16_board),
        num_names:      sizeof (aio_iiro_16_boards) /
        sizeof (aio_iiro_16_board),
index a9a7d9174e34f78e46b9a8d9e30122531a35a2e4..68c59babae1aaa47bf7842ffba07d2defdfa1568 100644 (file)
@@ -265,7 +265,7 @@ enum dio200_layout {
 };
 
 typedef struct dio200_board_struct {
-       char *name;
+       const char *name;
        enum dio200_bustype bustype;
        enum dio200_model model;
        enum dio200_layout layout;
@@ -436,7 +436,7 @@ static comedi_driver driver_amplc_dio200 = {
        module:         THIS_MODULE,
        attach:         dio200_attach,
        detach:         dio200_detach,
-       board_name:     (const char**)dio200_boards,
+       board_name:     &dio200_boards[0].name,
        offset:         sizeof(dio200_board),
        num_names:      sizeof(dio200_boards) / sizeof(dio200_board),
 };
index 5ba1ee95e49e70a42fc851477fff864c5bf9e20e..d21c010e8215b5959aea9829e0ce867e3b652191 100644 (file)
@@ -97,7 +97,7 @@ enum pc236_bustype {isa_bustype, pci_bustype};
 enum pc236_model {pc36at_model, pci236_model};
 
 typedef struct pc236_board_struct{
-       char *name;
+       const char *name;
        char *fancy_name;
        enum pc236_bustype bustype;
        enum pc236_model model;
@@ -153,7 +153,7 @@ static comedi_driver driver_amplc_pc236={
        module:         THIS_MODULE,
        attach:         pc236_attach,
        detach:         pc236_detach,
-       board_name:     (const char**)pc236_boards,
+       board_name:     &pc236_boards[0].name,
        offset:         sizeof(pc236_board),
        num_names:      sizeof(pc236_boards) / sizeof(pc236_board),
 };
index ed523bf5c625bc41db94b507bd721f7c36356eaf..3f932eb124503cfe28f1c2209bcc02428a8dc3b2 100644 (file)
@@ -67,7 +67,7 @@ enum pc263_bustype {isa_bustype, pci_bustype};
 enum pc263_model {pc263_model, pci263_model};
 
 typedef struct pc263_board_struct{
-       char *name;
+       const char *name;
        char *fancy_name;
        enum pc263_bustype bustype;
        enum pc263_model model;
@@ -121,7 +121,7 @@ static comedi_driver driver_amplc_pc263={
        module:         THIS_MODULE,
        attach:         pc263_attach,
        detach:         pc263_detach,
-       board_name:     (const char**)pc263_boards,
+       board_name:     &pc263_boards[0].name,
        offset:         sizeof(pc263_board),
        num_names:      sizeof(pc263_boards) / sizeof(pc263_board),
 };
index 76b68f33483836db84fc03362beec723cfd23274..696b7481e4953d4cddf23565bfd4d1a2d2918db7 100644 (file)
@@ -342,7 +342,7 @@ static unsigned short hwrange_pci234[1] = {
 enum pci224_model      { pci224_model, pci234_model };
 
 typedef struct pci224_board_struct {
-       char *name;
+       const char *name;
        enum pci224_model model;
        unsigned int ao_chans;
        unsigned int ao_bits;
@@ -419,7 +419,7 @@ static comedi_driver driver_amplc_pci224 = {
        module:         THIS_MODULE,
        attach:         pci224_attach,
        detach:         pci224_detach,
-       board_name:     (const char**)pci224_boards,
+       board_name:     &pci224_boards[0].name,
        offset:         sizeof(pci224_board),
        num_names:      sizeof(pci224_boards) / sizeof(pci224_board),
 };
index f4c888d12feb1b37dfe5f41cfe8c4240b9af2848..85b20f1be080f8918da0b47aded8b23839c784fb 100644 (file)
@@ -164,7 +164,7 @@ extra triggered scan functionality, interrupt bug-fix added by Steve Sharples
  */
 
 typedef struct pci230_board_struct{
-       char *name;
+       const char *name;
        unsigned short id;
        int ai_chans;
        int ai_bits;
@@ -268,7 +268,7 @@ static comedi_driver driver_amplc_pci230={
        module:         THIS_MODULE,
        attach:         pci230_attach,
        detach:         pci230_detach,
-       board_name:     (const char**)pci230_boards,
+       board_name:     &pci230_boards[0].name,
        offset:         sizeof(pci230_boards[0]),
        num_names:      sizeof(pci230_boards) / sizeof(pci230_boards[0]),
 };
index d3ff64b979c5d5bb2aa5961c95cb44efcb0d6e1f..022b0175690271a95cb8af3eccace31f1e90bda3 100644 (file)
@@ -120,7 +120,7 @@ MODULE_DESCRIPTION(MODULE_NAME ": A driver for COMEDI to bond multiple COMEDI de
  */
 struct BondingBoard
 {
-       char *name;
+       const char *name;
 };
 typedef struct BondingBoard BondingBoard;
 
@@ -205,7 +205,7 @@ static comedi_driver driver_bonding = {
         * the type of board in software.  ISA PnP, PCI, and PCMCIA
         * devices are such boards.
         */
-       board_name:     (const char**)bondingBoards,
+       board_name:     &bondingBoards[0].name,
        offset:         sizeof(BondingBoard),
        num_names:      sizeof(bondingBoards) / sizeof(BondingBoard),
 };
index 8fbd0017c1abc7e85da99efcbdc552fe0fddc0f8..d6a9d02ef70201c105cb73cc4f50e33d8101326f 100644 (file)
@@ -59,7 +59,7 @@ zero volts).
 
 /* Board descriptions */
 typedef struct waveform_board_struct{
-       char *name;
+       const char *name;
        int ai_chans;
        int ai_bits;
        int have_dio;
@@ -100,7 +100,7 @@ static comedi_driver driver_waveform={
        module:         THIS_MODULE,
        attach:         waveform_attach,
        detach:         waveform_detach,
-       board_name:     (const char**)waveform_boards,
+       board_name:     &waveform_boards[0].name,
        offset:         sizeof(waveform_board),
        num_names:      sizeof(waveform_boards) / sizeof(waveform_board),
 };
index 0f2b967cb808a2c0295278f9684bf01ab26a00a9..82d3597299bb7880ecfab5963989f30d5e1fb33a 100644 (file)
@@ -800,7 +800,7 @@ static comedi_driver driver_das08={
        module:         THIS_MODULE,
        attach:         das08_attach,
        detach:         das08_common_detach,
-       board_name:     (const char**)(das08_boards),
+       board_name:     &das08_boards[0].name,
        num_names:      sizeof(das08_boards)/sizeof(struct das08_board_struct),
        offset:         sizeof(struct das08_board_struct),
 };
index 10927c3ede1f7414de5b87d8f69068ef4ed684a6..0d63dd81d808baaad3657ffef67d7dab10220df0 100644 (file)
@@ -73,7 +73,7 @@ static comedi_driver driver_das08_cs =
        module: THIS_MODULE,
        attach: das08_cs_attach,
        detach: das08_common_detach,
-       board_name: das08_cs_boards,
+       board_name: &das08_cs_boards[0].name,
        num_names: sizeof(das08_cs_boards) / sizeof(struct das08_board_struct),
        offset: sizeof(struct das08_board_struct),
 };
index cb870651cfe24c622203dd0713a1bb93094c117a..f9c007f323e88f7a1d682aa104d08b3f083e1503 100644 (file)
@@ -344,7 +344,7 @@ static unsigned int das16_suggest_transfer_size(comedi_device *dev, comedi_cmd c
 static void reg_dump(comedi_device *dev);
 
 typedef struct das16_board_struct{
-       char            *name;
+       const char              *name;
        void            *ai;
        unsigned int    ai_nbits;
        unsigned int    ai_speed;       // max conversion speed in nanosec
@@ -701,7 +701,7 @@ static comedi_driver driver_das16={
        module:         THIS_MODULE,
        attach:         das16_attach,
        detach:         das16_detach,
-       board_name:     (const char**)das16_boards,
+       board_name:     &das16_boards[0].name,
        num_names:      n_das16_boards,
        offset:         sizeof(das16_boards[0]),
 };
index 8e957a46d87f6bac58cf0bfe71931a76eba53771..cf339f79fae165bb3096da98a7dc7464d153b283 100644 (file)
@@ -149,7 +149,7 @@ static unsigned int das16m1_set_pacer(comedi_device *dev, unsigned int ns, int r
 static int das16m1_irq_bits(unsigned int irq);
 
 typedef struct das16m1_board_struct{
-       char *name;
+       const char *name;
        unsigned int ai_speed;
 }das16m1_board;
 
@@ -169,7 +169,7 @@ static comedi_driver driver_das16m1={
        module:         THIS_MODULE,
        attach:         das16m1_attach,
        detach:         das16m1_detach,
-       board_name:     (const char**)das16m1_boards,
+       board_name:     &das16m1_boards[0].name,
        num_names:      das16m1_num_boards,
        offset:         sizeof(das16m1_boards[0]),
 };
index 1516268411ddde72fecae04f79a0f850f063e3d7..aff0b521db024a09400003c9e560d6b8f5a4bb9a 100644 (file)
@@ -231,7 +231,7 @@ static comedi_lrange range_ai_das1802 = {
 };
 
 typedef struct das1800_board_struct{
-       char *name;
+       const char *name;
        int ai_speed;   /* max conversion period in nanoseconds */
        int resolution; /* bits of ai resolution */
        int qram_len;   /* length of card's channel / gain queue */
@@ -499,7 +499,7 @@ static comedi_driver driver_das1800={
        attach:         das1800_attach,
        detach:         das1800_detach,
        num_names:      sizeof(das1800_boards) / sizeof(das1800_board),
-       board_name:     (const char**)das1800_boards,
+       board_name:     &das1800_boards[0].name,
        offset:         sizeof(das1800_board),
 };
 
index 99d9654a6fb64860601d3b0f19c9e791cd9a9d22..4d5fc16c79066e0a63a4773410f81fa8e76ea882 100644 (file)
@@ -106,7 +106,7 @@ cmd triggers supported:
 #define DAS800_ID             7
 
 typedef struct das800_board_struct{
-       char *name;
+       const char *name;
        int ai_speed;
        comedi_lrange *ai_range;
        int resolution;
@@ -251,7 +251,7 @@ static comedi_driver driver_das800={
        attach:         das800_attach,
        detach:         das800_detach,
        num_names:      sizeof(das800_boards) / sizeof(das800_board),
-       board_name:     (const char **)das800_boards,
+       board_name:     &das800_boards[0].name,
        offset:         sizeof(das800_board),
 };
 
index e0034fb6d1b139c8ed459f95a92a3ca3383e1224..6f99c5bab1648090836f889b376e23975f9ee68e 100644 (file)
@@ -208,7 +208,7 @@ static comedi_lrange dmm32at_aoranges =
  * Some drivers use arrays such as this, other do not.
  */
 typedef struct dmm32at_board_struct{
-       char *name;
+       const char *name;
        int ai_chans;
        int ai_bits;
        comedi_lrange *ai_ranges;
@@ -293,7 +293,7 @@ static comedi_driver driver_dmm32at={
  * the type of board in software.  ISA PnP, PCI, and PCMCIA
  * devices are such boards.
  */
-       board_name:     (const char**)dmm32at_boards,
+       board_name:     &dmm32at_boards[0].name,
        offset:         sizeof(dmm32at_board),
        num_names:      sizeof(dmm32at_boards) / sizeof(dmm32at_board),
 };
index 5f929752f375e7c1ccc0824abf6965022a21d716..0e17e8c9f962edc26a66b6d5969c8d353df8325e 100644 (file)
@@ -186,7 +186,7 @@ static comedi_lrange range_dt2811_pgl_ai_5_bipolar = { 4, {
 #define DT2811_ADMODE   0x03
 
 typedef struct {
-       char *name;
+       const char *name;
        comedi_lrange *bip_5;
        comedi_lrange *bip_2_5;
        comedi_lrange *unip_5;
@@ -212,7 +212,7 @@ static comedi_driver driver_dt2811={
        module:         THIS_MODULE,
        attach:         dt2811_attach,
        detach:         dt2811_detach,
-       board_name:     (const char **)boardtypes,
+       board_name:     &boardtypes[0].name,
        num_names:      sizeof(boardtypes)/sizeof(boardtype),
        offset:         sizeof(boardtype),
 };
index b681d301ced707ff12f233c2bdd48e8bb8674cb4..fcfc6f8044ef46fdf6e78c4a3867ff304033db74 100644 (file)
@@ -193,7 +193,7 @@ static comedi_lrange range_dt282x_ai_hi_unipolar = { 4, {
 
 
 typedef struct {
-       char *name;
+       const char *name;
        int adbits;
        int adchan_se;
        int adchan_di;
@@ -397,7 +397,7 @@ static comedi_driver driver_dt282x={
        module:         THIS_MODULE,
        attach:         dt282x_attach,
        detach:         dt282x_detach,
-       board_name:     (const char**)boardtypes,
+       board_name:     &boardtypes[0].name,
        num_names:      n_boardtypes,
        offset:         sizeof(boardtype_t),
 };
index 38c6752570aa5c33d934a9a30aa0af2d9532b92b..b4b7b04aca7675ce39946af55f221dd1500323a5 100644 (file)
@@ -139,7 +139,7 @@ static int icp_multi_detach(comedi_device *dev);
 static unsigned short  pci_list_builded=0;     /*>0 list of card is known */
 
 typedef struct {
-       char            *name;          // driver name
+       const char              *name;          // driver name
        int             device_id;
        int             iorange;        // I/O range len
        char            have_irq;       // 1=card support IRQ
@@ -185,7 +185,7 @@ static comedi_driver driver_icp_multi={
        attach:         icp_multi_attach,
        detach:         icp_multi_detach,
        num_names:      n_boardtypes,
-       board_name:     (const char**)boardtypes,
+       board_name:     &boardtypes[0].name,
        offset:         sizeof(boardtype),
 };
 COMEDI_INITCLEANUP(driver_icp_multi);
index 799b1b5a0eb45c06e4a66f8decde0f379a801cac..0b86ad585f1ffb39d5958d44634afc2cd7b674e0 100644 (file)
@@ -204,7 +204,7 @@ MODULE_DEVICE_TABLE(pci, me_pci_table);
 
 typedef struct
 {
-  char          *name;              // driver name
+  const char          *name;              // driver name
   int           device_id;
   int           ao_channel_nbr;     // DA config
   int           ao_resolution;
@@ -256,7 +256,7 @@ static comedi_driver me_driver=
   attach:      me_attach,
   detach:      me_detach,
   num_names:   me_board_nbr,
-  board_name:  (const char**)me_boards,
+  board_name:  &me_boards[0].name,
   offset:      sizeof(me_board_struct),
 };
 COMEDI_INITCLEANUP(me_driver);
index 5298492625356b157755d6c510c79d3d7438208b..997b55454436a813ccca8c9f3959d75da8fbc49f 100644 (file)
@@ -153,7 +153,7 @@ Configuration options:
  * Some drivers use arrays such as this, other do not.
  */
 typedef struct atao_board_struct{
-       char *name;
+       const char *name;
        int n_ao_chans;
 }atao_board;
 static atao_board atao_boards[] = {
@@ -185,7 +185,7 @@ static comedi_driver driver_atao={
        module:         THIS_MODULE,
        attach:         atao_attach,
        detach:         atao_detach,
-       board_name:     (const char**)atao_boards,
+       board_name:     &atao_boards[0].name,
        offset:         sizeof(atao_board),
        num_names:      sizeof(atao_boards) / sizeof(atao_board),
 };
index bc3850bd70ef8b52c0fb12d9f8943f3dab4ae15a..dcb72931c8d533aa2c7990bbc2bce067ca03364c 100644 (file)
@@ -106,7 +106,7 @@ Devices: [National Instruments] AT-MIO-16 (atmio16), AT-MIO-16D (atmio16d)
 
 
 typedef struct{
-       char *name;
+       const char *name;
        int has_8255;
 }atmio16_board_t;
 static atmio16_board_t atmio16_boards[]={
@@ -140,7 +140,7 @@ static comedi_driver driver_atmio16d={
        module:     THIS_MODULE,
        attach:     atmio16d_attach,
        detach:     atmio16d_detach,
-       board_name:     (const char**)atmio16_boards,
+       board_name:     &atmio16_boards[0].name,
        num_names:      n_atmio16_boards,
        offset:         sizeof(atmio16_board_t),
 };
index 1e480983d5857267b6a2a58e22180d16a1ca27dc..a3478b38742cf1f20b0cb2b92c7ccb6d8394219d 100644 (file)
@@ -73,7 +73,7 @@ static int dio24_detach(comedi_device *dev);
 enum dio24_bustype {pcmcia_bustype};
 
 typedef struct dio24_board_struct{
-       char *name;
+       const char *name;
        int device_id;  // device id for pcmcia board
        enum dio24_bustype bustype;     // PCMCIA
        int have_dio;   // have 8255 chip
@@ -116,7 +116,7 @@ static comedi_driver driver_dio24={
        attach:         dio24_attach,
        detach:         dio24_detach,
        num_names:      sizeof(dio24_boards) / sizeof(dio24_board),
-       board_name:     (char **)dio24_boards,
+       board_name:     &dio24_boards[0].name,
        offset:         sizeof(dio24_board),
 };
 
index c2570a995b556b9d25486b82441becc66dc58732..e4e116784259ef06437c324d5c473dd0d949fce5 100644 (file)
@@ -446,7 +446,7 @@ static comedi_driver driver_labpc={
        attach:         labpc_attach,
        detach:         labpc_common_detach,
        num_names:      sizeof(labpc_boards) / sizeof(labpc_board),
-       board_name: (const char **)labpc_boards,
+       board_name: &labpc_boards[0].name,
        offset:         sizeof(labpc_board),
 };
 
index e2aa49ef8162c4307d27fe9fb2fd6f1a6c0eeb4a..59a10bda6dcd813026b4a358c02596a2030e9ec1 100644 (file)
@@ -32,7 +32,7 @@ enum labpc_register_layout {labpc_plus_layout, labpc_1200_layout};
 enum transfer_type {fifo_not_empty_transfer, fifo_half_full_transfer, isa_dma_transfer};
 
 typedef struct labpc_board_struct{
-       char *name;
+       const char *name;
        int device_id;  // device id for pci and pcmcia boards
        int ai_speed;   // maximum input speed in nanoseconds
        enum labpc_bustype bustype;     // ISA/PCI/etc.
index 742c02801741512f22a4d18a674b04fb36dc36ad..3128285f3bc20198f6f425e1104e24b60e11eb80 100644 (file)
@@ -103,7 +103,7 @@ static comedi_driver driver_labpc_cs =
        .attach = &labpc_attach,
        .detach = &labpc_common_detach,
        .num_names = sizeof(labpc_cs_boards) / sizeof(labpc_board),
-       .board_name = (char **)labpc_cs_boards,
+       .board_name = &labpc_cs_boards[0].name,
        .offset = sizeof(labpc_board),
 };
 
index 8f50219b857a45eb753373022cfe2772a25694cf..f7b7de35356159fa42461edff01c3bd732b49400 100644 (file)
@@ -521,8 +521,6 @@ static irqreturn_t nidio_interrupt(int irq, void *d PT_REGS_ARG)
        //mite_dump_regs(mite);
        if(m_status & CHSR_INT){
                if(m_status & CHSR_LINKC){
-                       int retval;
-
                        writel(CHOR_CLRLC, mite->mite_io_addr + MITE_CHOR(devpriv->di_mite_chan->channel));
                        mite_sync_input_dma(devpriv->di_mite_chan, s->async);
                        /* XXX need to byteswap */
index 0bc2971eed9faaedad389e449411a34d0f3e779b..53cd0c51b1890f533c1ed64b898a735518a50fd2 100644 (file)
@@ -132,7 +132,7 @@ static comedi_lrange range_acl8112dg_ai = { 9, {
 static int i8253_osc_base = 500;       /* 2 Mhz */
 
 typedef struct {
-       char *name;
+       const char *name;
        int is_pcl711b;
        int is_8112;
        int is_dg;
@@ -160,7 +160,7 @@ static comedi_driver driver_pcl711={
        module:         THIS_MODULE,
        attach:         pcl711_attach,
        detach:         pcl711_detach,
-       board_name:     (const char**)boardtypes,
+       board_name:     &boardtypes[0].name,
        num_names:      n_boardtypes,
        offset:         sizeof(boardtype),
 };
index ac307e850d7a58e6f49a272ff62e3953462b741a..c26127a1139df58a3b50ff39aa7c35c492e7433b 100644 (file)
@@ -60,7 +60,7 @@ static int pcl724_attach(comedi_device *dev,comedi_devconfig *it);
 static int pcl724_detach(comedi_device *dev);
 
 typedef struct {
-       char            *name;          // driver name
+       const char              *name;          // board name
        int             dio;            // num of DIO
        int             numofports;     // num of 8255 subdevices
        unsigned int    IRQbits;        // allowed interrupts
@@ -87,7 +87,7 @@ static comedi_driver driver_pcl724={
        module:         THIS_MODULE,
        attach:         pcl724_attach,
        detach:         pcl724_detach,
-       board_name:     (const char**)boardtypes,
+       board_name:     &boardtypes[0].name,
        num_names:      n_boardtypes,
        offset:         sizeof(boardtype),
 };
index abc43ca51bd2b6d4e31764fb330ce87c89a08eb8..d9d6c24fd763dec3d8df69d9b94e1a799e7c27a3 100644 (file)
@@ -117,7 +117,7 @@ static int pcl726_attach(comedi_device *dev,comedi_devconfig *it);
 static int pcl726_detach(comedi_device *dev);
 
 typedef struct {
-       char            *name;          // driver name
+       const char              *name;          // driver name
        int             n_aochan;       // num of D/A chans
        int             num_of_ranges;  // num of ranges
        unsigned int    IRQbits;        // allowed interrupts
@@ -156,7 +156,7 @@ static comedi_driver driver_pcl726={
        module:         THIS_MODULE,
        attach:         pcl726_attach,
        detach:         pcl726_detach,
-       board_name:     (const char**)boardtypes,
+       board_name:     &boardtypes[0].name,
        num_names:      n_boardtypes,
        offset:         sizeof(boardtype),
 };
index 3bdf2c1cb5dc368aa1c0c79b46891f07baa93948..94ca5d6092363afefcf6b498be7cd9e83760ac76 100644 (file)
@@ -29,7 +29,7 @@ static int pcl730_attach(comedi_device *dev,comedi_devconfig *it);
 static int pcl730_detach(comedi_device *dev);
 
 typedef struct {
-       char    *name;          // driver name
+       const char      *name;          // board name
        unsigned int    io_range;       // len of I/O space
 } boardtype;
 
@@ -47,7 +47,7 @@ static comedi_driver driver_pcl730 = {
        module:         THIS_MODULE,
        attach:         pcl730_attach,
        detach:         pcl730_detach,
-       board_name: (const char**)boardtypes,
+       board_name: &boardtypes[0].name,
        num_names:      n_boardtypes,
        offset:         sizeof(boardtype),
 };
index e721abaa79775ffccedb77bae406d59d42d1691c..0b7b5a917fcdd4cd9f6c3e2faf01644a9c15c1d5 100644 (file)
@@ -284,7 +284,7 @@ static int pcl812_detach(comedi_device *dev);
 
 
 typedef struct {
-       char            *name;          // driver name
+       const char              *name;          // board name
        int             board_type;     // type of this board
        int             n_aichan;       // num of AI chans in S.E.
        int             n_aichan_diff;  // DIFF num of chans
@@ -368,7 +368,7 @@ static comedi_driver driver_pcl812={
        module:         THIS_MODULE,
        attach:         pcl812_attach,
        detach:         pcl812_detach,
-       board_name:     (const char**)boardtypes,
+       board_name:     &boardtypes[0].name,
        num_names:      n_boardtypes,
        offset:         sizeof(boardtype),
 };
index 80e5a04dfdc1fb8dbf5cc232fa8cded3bb67bf62..2ee3c1a0d3f003996020eb507a0ba76fbca76fa5 100644 (file)
@@ -105,7 +105,7 @@ static comedi_lrange range_pcl816 = { 8, {
                              }
 };
 typedef struct {
-  char *name;                  // driver name
+  const char *name;                    // board name
   int n_ranges;                        // len of range list
   int n_aichan;                        // num of A/D chans in diferencial mode
   unsigned int ai_ns_min;              // minimal alllowed delay between samples (in ns)
@@ -163,7 +163,7 @@ static comedi_driver driver_pcl816 = {
   module:       THIS_MODULE,
   attach:       pcl816_attach,
   detach:       pcl816_detach,
-  board_name:  (const char**)boardtypes,
+  board_name:  &boardtypes[0].name,
   num_names:   n_boardtypes,
   offset:              sizeof(boardtype),
 };
index 0ae5596f27a0b0ff72d056a7a325b298d65b2c54..5f8901611fc31b69fa1abe2e728f36243e1f10e7 100644 (file)
@@ -249,7 +249,7 @@ static int RTC_timer_lock = 0;              /* RTC int lock */
 #endif
 
 typedef struct {
-       char            *name;          // driver name
+       const char              *name;          // driver name
        int             n_ranges;       // len of range list
        int             n_aichan_se;    // num of A/D chans in single ended  mode
        int             n_aichan_diff;  // num of A/D chans in diferencial mode
@@ -294,7 +294,7 @@ static comedi_driver driver_pcl818={
        module:         THIS_MODULE,
        attach:         pcl818_attach,
        detach:         pcl818_detach,
-       board_name:     (const char**)boardtypes,
+       board_name:     &boardtypes[0].name,
        num_names:      n_boardtypes,
        offset:         sizeof(boardtype),
 };
index 40ba9babb2ae770e70adede30f4c8d2d8318cbf8..ddbdf5478ee322c85b8d41ad5c1be6cdd8dbcb1f 100644 (file)
@@ -66,7 +66,7 @@ static int pcm3724_attach(comedi_device *dev,comedi_devconfig *it);
 static int pcm3724_detach(comedi_device *dev);
 
 typedef struct {
-       char            *name;          // driver name
+       const char              *name;          // driver name
        int             dio;            // num of DIO
        int             numofports;     // num of 8255 subdevices
        unsigned int    IRQbits;        // allowed interrupts
@@ -91,7 +91,7 @@ static comedi_driver driver_pcm3724={
        module:         THIS_MODULE,
        attach:         pcm3724_attach,
        detach:         pcm3724_detach,
-       board_name:     (const char**)boardtypes,
+       board_name:     &boardtypes[0].name,
        num_names:      n_boardtypes,
        offset:         sizeof(boardtype),
 };
index 17d7fcb7e9bbe6e26cc307f5528fe45570747bbd..53bbfc9bd07585799b864ac50ab68230c55d106b 100644 (file)
@@ -55,7 +55,7 @@ Configuration options:
 #define PCMAD_CONVERT          1
 
 struct pcmad_board_struct{
-       char *name;
+       const char *name;
        int n_ai_bits;
 };
 static struct pcmad_board_struct pcmad_boards[]={
@@ -84,7 +84,7 @@ static comedi_driver driver_pcmad={
        module:         THIS_MODULE,
        attach:         pcmad_attach,
        detach:         pcmad_detach,
-       board_name:     (const char**)pcmad_boards,
+       board_name:     &pcmad_boards[0].name,
        num_names:      n_pcmad_boards,
        offset:         sizeof(pcmad_boards[0]),
 };
index 395f7f548751c1692940cc8c40a2249dbc39fd63..464211e82ec4a8691ab07f4c7e563ec5013880e1 100644 (file)
@@ -71,7 +71,7 @@ Configuration Options:
  */
 typedef struct pcmda12_board_struct
 {
-       char * const name;
+       const char * const name;
 } pcmda12_board;
 
 /* note these have no effect and are merely here for reference..
@@ -139,7 +139,7 @@ static comedi_driver driver =
         * the type of board in software.  ISA PnP, PCI, and PCMCIA
         * devices are such boards.
         */
-       board_name:     (const char**)pcmda12_boards,
+       board_name:     &pcmda12_boards[0].name,
        offset:         sizeof(pcmda12_board),
        num_names:      sizeof(pcmda12_boards) / sizeof(pcmda12_board),
 };
index d15b5aec39f50d6236e6b8993b94f87055a0fb69..3edce8ba97f9fc36271164bb3bf57afe5a9706e9 100644 (file)
@@ -153,7 +153,7 @@ static int ao_winsn(comedi_device *, comedi_subdevice *, comedi_insn *, lsampl_t
  */
 typedef struct pcmmio_board_struct
 {
-       char * const name;
+       const char * const name;
        const int dio_num_asics;
        const int dio_num_ports;
     const int total_iosize;
@@ -181,16 +181,16 @@ static pcmmio_board pcmmio_boards[] =
                name:              "pcmmio",
                dio_num_asics:     1,
                dio_num_ports:     6,
-        total_iosize:      32, 
-        ai_bits:           16,
-        ao_bits:           16,
-        n_ai_chans:        16,
-        n_ao_chans:        8,
-        ai_range_table:    (comedi_lrange *)&ranges_ai,
-        ao_range_table:    (comedi_lrange *)&ranges_ao,
-        ai_rinsn:          ai_rinsn,
-        ao_rinsn:          ao_rinsn,
-        ao_winsn:          ao_winsn
+               total_iosize:      32, 
+               ai_bits:           16,
+               ao_bits:           16,
+               n_ai_chans:        16,
+               n_ao_chans:        8,
+               ai_range_table:    (comedi_lrange *)&ranges_ai,
+               ao_range_table:    (comedi_lrange *)&ranges_ao,
+               ai_rinsn:          ai_rinsn,
+               ao_rinsn:          ao_rinsn,
+               ao_winsn:          ao_winsn
        },
 };
 
@@ -294,7 +294,7 @@ static comedi_driver driver =
         * the type of board in software.  ISA PnP, PCI, and PCMCIA
         * devices are such boards.
         */
-       board_name:     (const char **)pcmmio_boards,
+       board_name:     &pcmmio_boards[0].name,
        offset:         sizeof(pcmmio_board),
        num_names:      sizeof(pcmmio_boards) / sizeof(pcmmio_board),
 };
index 71840663fda9b86c11b0cec43ba9c1be78f49112..b63f452c64a1b29c57532800cc2391f4675418ee 100644 (file)
@@ -149,7 +149,7 @@ Configuration Options:
  */
 typedef struct pcmuio_board_struct
 {
-       char * const name;
+       const char * const name;
        const int num_asics;
        const int num_channels_per_port;
        const int num_ports;
@@ -255,7 +255,7 @@ static comedi_driver driver =
         * the type of board in software.  ISA PnP, PCI, and PCMCIA
         * devices are such boards.
         */
-       board_name:     (const char**)pcmuio_boards,
+       board_name:     &pcmuio_boards[0].name,
        offset:         sizeof(pcmuio_board),
        num_names:      sizeof(pcmuio_boards) / sizeof(pcmuio_board),
 };
index a30619823122f7d85bd104b4da4057bf005e7e3a..712e97121b56e4dfa69461bd309d9442f459aa52 100644 (file)
@@ -52,7 +52,7 @@ static int pcl734_insn_bits(comedi_device *dev,comedi_subdevice *s,
        comedi_insn *insn,lsampl_t *data);
 
 struct boarddef_struct{
-       char *name;
+       const char *name;
        unsigned int iosize;
        int (*setup)(comedi_device *);
        int type;
@@ -103,7 +103,7 @@ static comedi_driver driver_poc=
        module:         THIS_MODULE,
        attach:         poc_attach,
        detach:         poc_detach,
-       board_name:     (const char**)boards,
+       board_name:     &boards[0].name,
        num_names:      n_boards,
        offset:         sizeof(boards[0]),
 };
index 2e58b512ae3a4441f2041b61e0848265d8b6eac6..03f15b98ae4c84cfe01b326c090f3f7a66ce9a08 100644 (file)
@@ -265,7 +265,7 @@ static comedi_lrange rtd_ao_range = { 4, {
   Board descriptions
  */
 typedef struct rtdBoard_struct{
-    char       *name;                  /* must be first */
+    const char *name;                  /* must be first */
     int                device_id;
     int                aiChans;
     int                aiBits;
@@ -713,7 +713,7 @@ static comedi_driver rtd520Driver={
     module:            THIS_MODULE,
     attach:            rtd_attach,
     detach:            rtd_detach,
-    board_name:                (const char**)rtd520Boards,
+    board_name:                &rtd520Boards[0].name,
     offset:            sizeof(rtdBoard),
     num_names:         sizeof(rtd520Boards) / sizeof(rtdBoard),
 };
index c9b62305d20b66f21e3951e77bb5cc596d9ffb77..83b13289e3393bbcea9a29d546da1755122c0f74 100644 (file)
@@ -117,7 +117,7 @@ static comedi_lrange range_rti800_ai_unipolar = { 4, {
 }};
 
 typedef struct{
-       char *name;
+       const char *name;
        int has_ao;
 }boardtype;
 static boardtype boardtypes[]={
@@ -134,7 +134,7 @@ static comedi_driver driver_rti800={
        attach:         rti800_attach,
        detach:         rti800_detach,
        num_names:      sizeof(boardtypes)/sizeof(boardtype),
-       board_name:     (const char**)boardtypes,
+       board_name:     &boardtypes[0].name,
        offset:         sizeof(boardtype),
 };
 COMEDI_INITCLEANUP(driver_rti800);
index 4f8d1bd2d8acb771ae30271ad8fc8a6141c5c699..a6a9c09f2d6e10924062abf4c70ccf6b00ae11fb 100644 (file)
@@ -167,7 +167,7 @@ static unsigned short s526_ai_config = 0;
  * Some drivers use arrays such as this, other do not.
  */
 typedef struct s526_board_struct{
-       char *name;
+       const char *name;
        int gpct_chans;
        int gpct_bits;
        int ad_chans;
@@ -247,7 +247,7 @@ static comedi_driver driver_s526={
          * the type of board in software.  ISA PnP, PCI, and PCMCIA
          * devices are such boards.
          */
-        board_name:     (const char**)s526_boards,
+        board_name:     &s526_boards[0].name,
         offset:         sizeof(s526_board),
         num_names:      sizeof(s526_boards) / sizeof(s526_board),
 };
index b8f9e4022c155920bcbcb393dd384b8b08159464..7de3a0a8559d243e2605f56563a9b0f43c52e754 100644 (file)
@@ -90,7 +90,7 @@ Configuration Options:
  * Some drivers use arrays such as this, other do not.
  */
 typedef struct skel_board_struct{
-       char *name;
+       const char *name;
        int ai_chans;
        int ai_bits;
        int have_dio;
@@ -176,7 +176,7 @@ static comedi_driver driver_skel={
         * the type of board in software.  ISA PnP, PCI, and PCMCIA
         * devices are such boards.
         */
-       board_name:     (const char**)skel_boards,
+       board_name:     &skel_boards[0].name,
        offset:         sizeof(skel_board),
        num_names:      sizeof(skel_boards) / sizeof(skel_board),
 };
index 676b859ab85b5d9d4fbe402d9c18e4ca7260e32d..96a1192b77de1e66519ff2632d908504b6019bb5 100644 (file)
@@ -55,7 +55,7 @@ Status: unknown
 /* This data structure holds information about the supported boards -------- */
 
 typedef struct dnp_board_struct{
-       char *name;
+       const char *name;
        int ai_chans;
        int ai_bits;
        int have_dio;
@@ -100,7 +100,7 @@ static comedi_driver driver_dnp = {
   module:       THIS_MODULE,
   attach:       dnp_attach,
   detach:       dnp_detach,
-  board_name:   (const char**)dnp_boards,             /* only necessary for non-PnP devs   */
+  board_name:   &dnp_boards[0].name,             /* only necessary for non-PnP devs   */
   offset:       sizeof(dnp_board),      /* like ISA-PnP, PCI or PCMCIA.      */
   num_names:   sizeof(dnp_boards) / sizeof(dnp_board),
 };
index ea29b5ee3fab32c5714043f543d438623fca27ee..4b7b4177383a05d52dba24a20a1bb486daebd225 100644 (file)
@@ -206,7 +206,7 @@ struct comedi_driver_struct{
 
        /* number of elements in board_name and board_id arrays */
        unsigned int num_names;
-       const char **board_name;
+       const char * const *board_name;
        /* offset in bytes from one board name pointer to the next */
        int offset;
 };