summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/frontends')
-rw-r--r--linux/drivers/media/dvb/frontends/stv0299.c6
-rw-r--r--linux/drivers/media/dvb/frontends/tda1004x.c6
2 files changed, 5 insertions, 7 deletions
diff --git a/linux/drivers/media/dvb/frontends/stv0299.c b/linux/drivers/media/dvb/frontends/stv0299.c
index af1429a35..9e730039d 100644
--- a/linux/drivers/media/dvb/frontends/stv0299.c
+++ b/linux/drivers/media/dvb/frontends/stv0299.c
@@ -430,8 +430,6 @@ static int tsa5059_set_tv_freq (struct i2c_adapter *i2c, u32 freq, int ftype, in
}
-
-#define ABS(x) ((x) < 0 ? -(x) : (x))
#define MIN2(a,b) ((a) < (b) ? (a) : (b))
#define MIN3(a,b,c) MIN2(MIN2(a,b),c)
@@ -448,8 +446,8 @@ static int tua6100_set_tv_freq (struct i2c_adapter *i2c, u32 freq,
first_ZF = (freq) / 1000;
- if (ABS(MIN2(ABS(first_ZF-1190),ABS(first_ZF-1790))) <
- ABS(MIN3(ABS(first_ZF-1202),ABS(first_ZF-1542),ABS(first_ZF-1890))))
+ if (abs(MIN2(abs(first_ZF-1190),abs(first_ZF-1790))) <
+ abs(MIN3(abs(first_ZF-1202),abs(first_ZF-1542),abs(first_ZF-1890))))
_fband = 2;
else
_fband = 3;
diff --git a/linux/drivers/media/dvb/frontends/tda1004x.c b/linux/drivers/media/dvb/frontends/tda1004x.c
index 69c7bfd82..7ea4dff61 100644
--- a/linux/drivers/media/dvb/frontends/tda1004x.c
+++ b/linux/drivers/media/dvb/frontends/tda1004x.c
@@ -521,7 +521,7 @@ static int tda10046_fwupload(struct i2c_adapter *i2c, struct tda1004x_state *sta
static int tda10045h_init(struct i2c_adapter *i2c, struct tda1004x_state *tda_state)
{
- struct i2c_msg tuner_msg = {.addr = 0,.flags = 0,.buf = 0,.len = 0 };
+ struct i2c_msg tuner_msg = {.addr = 0,.flags = 0,.buf = NULL,.len = 0 };
static u8 disable_mc44BC374c[] = { 0x1d, 0x74, 0xa0, 0x68 };
dprintk("%s\n", __FUNCTION__);
@@ -556,7 +556,7 @@ static int tda10045h_init(struct i2c_adapter *i2c, struct tda1004x_state *tda_st
static int tda10046h_init(struct i2c_adapter *i2c, struct tda1004x_state *tda_state)
{
- struct i2c_msg tuner_msg = {.addr = 0,.flags = 0,.buf = 0,.len = 0 };
+ struct i2c_msg tuner_msg = {.addr = 0,.flags = 0,.buf = NULL,.len = 0 };
static u8 disable_mc44BC374c[] = { 0x1d, 0x74, 0xa0, 0x68 };
dprintk("%s\n", __FUNCTION__);
@@ -1353,7 +1353,7 @@ static int tda1004x_attach(struct i2c_adapter *i2c, struct tda1004x_state* state
int tuner_address = -1;
int fe_type = -1;
int tuner_type = -1;
- struct i2c_msg tuner_msg = {.addr=0, .flags=0, .buf=0, .len=0 };
+ struct i2c_msg tuner_msg = {.addr=0, .flags=0, .buf=NULL, .len=0 };
static u8 td1344_init[] = { 0x0b, 0xf5, 0x88, 0xab };
static u8 td1316_init[] = { 0x0b, 0xf5, 0x85, 0xab };
static u8 td1316_init_tda10046h[] = { 0x0b, 0xf5, 0x80, 0xab };