Staging: comedi: fix "foo * bar" should be "foo *bar"
[firefly-linux-kernel-4.4.55.git] / drivers / staging / comedi / drivers / ni_labpc_cs.c
index ac0ce2f58f5f27f619d2868dd1b195aa60fd4259..b0c523e9f198e41334928ea650524d84535a650d 100644 (file)
@@ -60,7 +60,7 @@ NI manuals:
 */
 
 #undef LABPC_DEBUG
-//#define LABPC_DEBUG   // enable debugging messages
+/* #define LABPC_DEBUG */   /*  enable debugging messages */
 
 #include "../comedidev.h"
 
@@ -79,12 +79,12 @@ NI manuals:
 
 static struct pcmcia_device *pcmcia_cur_dev = NULL;
 
-static int labpc_attach(struct comedi_device * dev, struct comedi_devconfig * it);
+static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it);
 
-static const labpc_board labpc_cs_boards[] = {
+static const struct labpc_board_struct labpc_cs_boards[] = {
        {
              name:     "daqcard-1200",
-             device_id:0x103,  // 0x10b is manufacturer id, 0x103 is device id
+             device_id:0x103,  /*  0x10b is manufacturer id, 0x103 is device id */
              ai_speed:10000,
              bustype:  pcmcia_bustype,
              register_layout:labpc_1200_layout,
@@ -114,29 +114,29 @@ static const labpc_board labpc_cs_boards[] = {
 /*
  * Useful for shorthand access to the particular board structure
  */
-#define thisboard ((const labpc_board *)dev->board_ptr)
+#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 = sizeof(labpc_cs_boards) / sizeof(labpc_board),
+       .num_names = sizeof(labpc_cs_boards) / sizeof(struct labpc_board_struct),
        .board_name = &labpc_cs_boards[0].name,
-       .offset = sizeof(labpc_board),
+       .offset = sizeof(struct labpc_board_struct),
 };
 
-static int labpc_attach(struct comedi_device * dev, struct comedi_devconfig * it)
+static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 {
        unsigned long iobase = 0;
        unsigned int irq = 0;
        struct pcmcia_device *link;
 
        /* allocate and initialize dev->private */
-       if (alloc_private(dev, sizeof(labpc_private)) < 0)
+       if (alloc_private(dev, sizeof(struct labpc_private)) < 0)
                return -ENOMEM;
 
-       // get base address, irq etc. based on bustype
+       /*  get base address, irq etc. based on bustype */
        switch (thisboard->bustype) {
        case pcmcia_bustype:
                link = pcmcia_cur_dev;  /* XXX hack */
@@ -213,12 +213,12 @@ static void labpc_cs_detach(struct pcmcia_device *);
 
 static const dev_info_t dev_info = "daqcard-1200";
 
-typedef struct local_info_t {
+struct local_info_t {
        struct pcmcia_device *link;
        dev_node_t node;
        int stop;
        struct bus_operations *bus;
-} local_info_t;
+};
 
 /*======================================================================
 
@@ -234,12 +234,12 @@ typedef struct local_info_t {
 
 static int labpc_cs_attach(struct pcmcia_device *link)
 {
-       local_info_t *local;
+       struct local_info_t *local;
 
        DEBUG(0, "labpc_cs_attach()\n");
 
        /* Allocate space for private device-specific data */
-       local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
+       local = kzalloc(sizeof(struct local_info_t), GFP_KERNEL);
        if (!local)
                return -ENOMEM;
        local->link = link;
@@ -287,7 +287,7 @@ static void labpc_cs_detach(struct pcmcia_device *link)
           detach().
         */
        if (link->dev_node) {
-               ((local_info_t *) link->priv)->stop = 1;
+               ((struct local_info_t *) link->priv)->stop = 1;
                labpc_release(link);
        }
 
@@ -307,7 +307,7 @@ static void labpc_cs_detach(struct pcmcia_device *link)
 
 static void labpc_config(struct pcmcia_device *link)
 {
-       local_info_t *dev = link->priv;
+       struct local_info_t *dev = link->priv;
        tuple_t tuple;
        cisparse_t parse;
        int last_ret;
@@ -501,7 +501,7 @@ static void labpc_release(struct pcmcia_device *link)
 
 static int labpc_cs_suspend(struct pcmcia_device *link)
 {
-       local_info_t *local = link->priv;
+       struct local_info_t *local = link->priv;
 
        /* Mark the device as stopped, to block IO until later */
        local->stop = 1;
@@ -510,7 +510,7 @@ static int labpc_cs_suspend(struct pcmcia_device *link)
 
 static int labpc_cs_resume(struct pcmcia_device *link)
 {
-       local_info_t *local = link->priv;
+       struct local_info_t *local = link->priv;
 
        local->stop = 0;
        return 0;