]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/staging/comedi/drivers/serial2002.c
Merge branch 'omap-clock-fixes' of git://git.pwsan.com/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / staging / comedi / drivers / serial2002.c
index 77c2345330056209b60cbb67242a4dc971d8c7f4..844fd5e2e3a9f049e62237c802020764cedff2be 100644 (file)
@@ -46,11 +46,11 @@ Status: in development
  * boards in this way is optional, and completely driver-dependent.
  * Some drivers use arrays such as this, other do not.
  */
-typedef struct serial2002_board_struct {
+struct serial2002_board {
        const char *name;
-} serial2002_board;
+};
 
-static const serial2002_board serial2002_boards[] = {
+static const struct serial2002_board serial2002_boards[] = {
        {
       name:    "serial2002"}
 };
@@ -58,7 +58,7 @@ static const serial2002_board serial2002_boards[] = {
 /*
  * Useful for shorthand access to the particular board structure
  */
-#define thisboard ((const serial2002_board *)dev->board_ptr)
+#define thisboard ((const struct serial2002_board *)dev->board_ptr)
 
 struct serial2002_range_table_t {
 
@@ -68,7 +68,8 @@ struct serial2002_range_table_t {
 };
 
 
-typedef struct {
+struct serial2002_private {
+
        int port;               // /dev/ttyS<port>
        int speed;              // baudrate
        struct file *tty;
@@ -79,13 +80,14 @@ typedef struct {
        unsigned char analog_out_mapping[32];
        unsigned char encoder_in_mapping[32];
        struct serial2002_range_table_t in_range[32], out_range[32];
-} serial2002_private;
+};
+
 
 /*
  * most drivers define the following macro to make it easy to
  * access the private structure.
  */
-#define devpriv ((serial2002_private *)dev->private)
+#define devpriv ((struct serial2002_private *)dev->private)
 
 static int serial2002_attach(struct comedi_device * dev, struct comedi_devconfig * it);
 static int serial2002_detach(struct comedi_device * dev);
@@ -95,8 +97,8 @@ struct comedi_driver driver_serial2002 = {
       attach:serial2002_attach,
       detach:serial2002_detach,
       board_name:&serial2002_boards[0].name,
-      offset:sizeof(serial2002_board),
-      num_names:sizeof(serial2002_boards) / sizeof(serial2002_board),
+      offset:sizeof(struct serial2002_board),
+      num_names:sizeof(serial2002_boards) / sizeof(struct serial2002_board),
 };
 
 static int serial2002_di_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
@@ -786,7 +788,7 @@ static int serial2002_attach(struct comedi_device * dev, struct comedi_devconfig
 
        printk("comedi%d: serial2002: ", dev->minor);
        dev->board_name = thisboard->name;
-       if (alloc_private(dev, sizeof(serial2002_private)) < 0) {
+       if (alloc_private(dev, sizeof(struct serial2002_private)) < 0) {
                return -ENOMEM;
        }
        dev->open = serial_2002_open;