]> git.hungrycats.org Git - linux/commitdiff
[PATCH] C99 initializers for drivers/media/dvb/frontends/alps_tdlb7.c
authorAndrew Morton <akpm@osdl.org>
Thu, 26 Feb 2004 00:27:44 +0000 (16:27 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 26 Feb 2004 00:27:44 +0000 (16:27 -0800)
From: "Art Haas" <ahaas@airmail.net>

Here's a small patch changing the GNU-style initializers to C99
initializers.

drivers/media/dvb/frontends/alps_tdlb7.c

index f46f24fef213eff967a5322dcb509ca40e13c7fa..f1ca0da41397ff3da2f1a52c600e783647dcc5ec 100644 (file)
@@ -61,22 +61,29 @@ static int debug = 0;
 static int errno;
 
 static struct dvb_frontend_info tdlb7_info = {
-       name: "Alps TDLB7",
-       type: FE_OFDM,
-       frequency_min: 470000000,
-       frequency_max: 860000000,
-       frequency_stepsize: 166666,
-       caps: FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
-             FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
-             FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
-             FE_CAN_HIERARCHY_AUTO |  FE_CAN_RECOVER
+       .name                   = "Alps TDLB7",
+       .type                   = FE_OFDM,
+       .frequency_min          = 470000000,
+       .frequency_max          = 860000000,
+       .frequency_stepsize     = 166666,
+       .caps                   = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 |
+                                 FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 |
+                                 FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
+                                 FE_CAN_QPSK | FE_CAN_QAM_16 |
+                                 FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
+                                 FE_CAN_HIERARCHY_AUTO |  FE_CAN_RECOVER
 };
 
 
 static int sp8870_writereg (struct dvb_i2c_bus *i2c, u16 reg, u16 data)
 {
         u8 buf [] = { reg >> 8, reg & 0xff, data >> 8, data & 0xff };
-       struct i2c_msg msg = { addr: 0x71, flags: 0, buf: buf, len: 4 };
+       struct i2c_msg msg = {
+               .addr = 0x71,
+               .flags = 0,
+               .buf = buf,
+               .len =  4
+       };
        int err;
 
         if ((err = i2c->xfer (i2c, &msg, 1)) != 1) {
@@ -93,8 +100,20 @@ static u16 sp8870_readreg (struct dvb_i2c_bus *i2c, u16 reg)
        int ret;
        u8 b0 [] = { reg >> 8 , reg & 0xff };
        u8 b1 [] = { 0, 0 };
-       struct i2c_msg msg [] = { { addr: 0x71, flags: 0, buf: b0, len: 2 },
-                          { addr: 0x71, flags: I2C_M_RD, buf: b1, len: 2 } };
+       struct i2c_msg msg [] = {
+               {
+                       .addr   = 0x71,
+                       .flags  = 0,
+                       .buf    = b0,
+                       .len    = 2
+               },
+               {
+                       .addr   = 0x71,
+                       .flags  = I2C_M_RD,
+                       .buf    = b1,
+                       .len    = 2
+               }
+       };
 
        ret = i2c->xfer (i2c, msg, 2);
 
@@ -110,7 +129,12 @@ static u16 sp8870_readreg (struct dvb_i2c_bus *i2c, u16 reg)
 static int sp5659_write (struct dvb_i2c_bus *i2c, u8 data [4])
 {
         int ret;
-        struct i2c_msg msg = { addr: 0x60, flags: 0, buf: data, len: 4 };
+        struct i2c_msg msg = {
+               .addr   = 0x60,
+               .flags  = 0,
+               .buf    = data,
+               .len    =4
+       };
 
         ret = i2c->xfer (i2c, &msg, 1);
 
@@ -667,8 +691,21 @@ static int tdlb7_attach (struct dvb_i2c_bus *i2c, void **data)
 {
         u8 b0 [] = { 0x02 , 0x00 };
         u8 b1 [] = { 0, 0 };
-        struct i2c_msg msg [] = { { addr: 0x71, flags: 0, buf: b0, len: 2 },
-                                  { addr: 0x71, flags: I2C_M_RD, buf: b1, len: 2 } };
+        struct i2c_msg msg [] =
+                       {
+                               {
+                                       .addr = 0x71,
+                                       .flags = 0,
+                                       .buf = b0,
+                                       .len = 2
+                               },
+                               {
+                                       .addr = 0x71,
+                                       .flags = I2C_M_RD,
+                                       .buf = b1,
+                                       .len = 2
+                               }
+                       };
 
        dprintk ("%s\n", __FUNCTION__);