Commit 3b6a3c78 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] C99 initializers for drivers/media/dvb/frontends/alps_tdlb7.c

From: "Art Haas" <ahaas@airmail.net>

Here's a small patch changing the GNU-style initializers to C99
initializers.
parent 39d20f05
......@@ -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__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment