diff options
Diffstat (limited to 'drivers/media/dvb-frontends')
28 files changed, 42 insertions, 57 deletions
diff --git a/drivers/media/dvb-frontends/af9013_priv.h b/drivers/media/dvb-frontends/af9013_priv.h index 3b9b9424fe1a..bba7a9693a23 100644 --- a/drivers/media/dvb-frontends/af9013_priv.h +++ b/drivers/media/dvb-frontends/af9013_priv.h @@ -12,7 +12,7 @@ #define AF9013_PRIV_H #include <media/dvb_frontend.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "af9013.h" #include <linux/firmware.h> #include <linux/i2c-mux.h> diff --git a/drivers/media/dvb-frontends/af9033_priv.h b/drivers/media/dvb-frontends/af9033_priv.h index 0e64da0cdeab..7560da75ef00 100644 --- a/drivers/media/dvb-frontends/af9033_priv.h +++ b/drivers/media/dvb-frontends/af9033_priv.h @@ -14,7 +14,7 @@ #include <linux/math64.h> #include <linux/regmap.h> #include <linux/kernel.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> struct reg_val { u32 reg; diff --git a/drivers/media/dvb-frontends/cx24120.c b/drivers/media/dvb-frontends/cx24120.c index d8acd582c711..0f778660c72b 100644 --- a/drivers/media/dvb-frontends/cx24120.c +++ b/drivers/media/dvb-frontends/cx24120.c @@ -973,7 +973,9 @@ static void cx24120_set_clock_ratios(struct dvb_frontend *fe) cmd.arg[8] = (clock_ratios_table[idx].rate >> 8) & 0xff; cmd.arg[9] = (clock_ratios_table[idx].rate >> 0) & 0xff; - cx24120_message_send(state, &cmd); + ret = cx24120_message_send(state, &cmd); + if (ret != 0) + return; /* Calculate ber window rates for stat work */ cx24120_calculate_ber_window(state, clock_ratios_table[idx].rate); diff --git a/drivers/media/dvb-frontends/cxd2820r_priv.h b/drivers/media/dvb-frontends/cxd2820r_priv.h index 9b4d9cf8563d..605320bbc12b 100644 --- a/drivers/media/dvb-frontends/cxd2820r_priv.h +++ b/drivers/media/dvb-frontends/cxd2820r_priv.h @@ -11,7 +11,7 @@ #include <linux/dvb/version.h> #include <media/dvb_frontend.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "cxd2820r.h" #include <linux/gpio/driver.h> /* For gpio_chip */ #include <linux/math64.h> diff --git a/drivers/media/dvb-frontends/cxd2841er.c b/drivers/media/dvb-frontends/cxd2841er.c index 5431f922f55e..ef403a9fb753 100644 --- a/drivers/media/dvb-frontends/cxd2841er.c +++ b/drivers/media/dvb-frontends/cxd2841er.c @@ -22,7 +22,7 @@ #include <linux/dynamic_debug.h> #include <linux/kernel.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include <media/dvb_frontend.h> #include "cxd2841er.h" #include "cxd2841er_priv.h" diff --git a/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt2_mon.c b/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt2_mon.c index 604580bf7cf7..4e173dd87ecf 100644 --- a/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt2_mon.c +++ b/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt2_mon.c @@ -11,7 +11,7 @@ #include "cxd2880_tnrdmd_dvbt2.h" #include "cxd2880_tnrdmd_dvbt2_mon.h" -#include <media/dvb_math.h> +#include <linux/int_log.h> static const int ref_dbm_1000[4][8] = { {-96000, -95000, -94000, -93000, -92000, -92000, -98000, -97000}, diff --git a/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt_mon.c b/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt_mon.c index fedc3b4a2fa0..86d5a1e4022a 100644 --- a/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt_mon.c +++ b/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt_mon.c @@ -11,7 +11,7 @@ #include "cxd2880_tnrdmd_dvbt.h" #include "cxd2880_tnrdmd_dvbt_mon.h" -#include <media/dvb_math.h> +#include <linux/int_log.h> static const int ref_dbm_1000[3][5] = { {-93000, -91000, -90000, -89000, -88000}, diff --git a/drivers/media/dvb-frontends/cxd2880/cxd2880_top.c b/drivers/media/dvb-frontends/cxd2880/cxd2880_top.c index d5b1b3788e39..f67b6d24b8d4 100644 --- a/drivers/media/dvb-frontends/cxd2880/cxd2880_top.c +++ b/drivers/media/dvb-frontends/cxd2880/cxd2880_top.c @@ -11,7 +11,7 @@ #include <linux/spi/spi.h> #include <media/dvb_frontend.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "cxd2880.h" #include "cxd2880_tnrdmd_mon.h" diff --git a/drivers/media/dvb-frontends/dib7000p.c b/drivers/media/dvb-frontends/dib7000p.c index a90d2f51868f..9273758bf140 100644 --- a/drivers/media/dvb-frontends/dib7000p.c +++ b/drivers/media/dvb-frontends/dib7000p.c @@ -13,7 +13,7 @@ #include <linux/mutex.h> #include <asm/div64.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include <media/dvb_frontend.h> #include "dib7000p.h" @@ -497,7 +497,7 @@ static int dib7000p_update_pll(struct dvb_frontend *fe, struct dibx000_bandwidth prediv = reg_1856 & 0x3f; loopdiv = (reg_1856 >> 6) & 0x3f; - if ((bw != NULL) && (bw->pll_prediv != prediv || bw->pll_ratio != loopdiv)) { + if (loopdiv && bw && (bw->pll_prediv != prediv || bw->pll_ratio != loopdiv)) { dprintk("Updating pll (prediv: old = %d new = %d ; loopdiv : old = %d new = %d)\n", prediv, bw->pll_prediv, loopdiv, bw->pll_ratio); reg_1856 &= 0xf000; reg_1857 = dib7000p_read_word(state, 1857); diff --git a/drivers/media/dvb-frontends/dib8000.c b/drivers/media/dvb-frontends/dib8000.c index fe19d127abb3..2abda7d1cb6e 100644 --- a/drivers/media/dvb-frontends/dib8000.c +++ b/drivers/media/dvb-frontends/dib8000.c @@ -13,7 +13,7 @@ #include <linux/mutex.h> #include <asm/div64.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include <media/dvb_frontend.h> diff --git a/drivers/media/dvb-frontends/dib9000.c b/drivers/media/dvb-frontends/dib9000.c index 914ca820c174..1c57587a917a 100644 --- a/drivers/media/dvb-frontends/dib9000.c +++ b/drivers/media/dvb-frontends/dib9000.c @@ -11,7 +11,7 @@ #include <linux/i2c.h> #include <linux/mutex.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include <media/dvb_frontend.h> #include "dib9000.h" diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c index 3301ef75d441..2770baebbbbc 100644 --- a/drivers/media/dvb-frontends/drxk_hard.c +++ b/drivers/media/dvb-frontends/drxk_hard.c @@ -20,7 +20,7 @@ #include <media/dvb_frontend.h> #include "drxk.h" #include "drxk_hard.h" -#include <media/dvb_math.h> +#include <linux/int_log.h> static int power_down_dvbt(struct drxk_state *state, bool set_power_mode); static int power_down_qam(struct drxk_state *state); @@ -229,13 +229,8 @@ static int i2c_write(struct drxk_state *state, u8 adr, u8 *data, int len) struct i2c_msg msg = { .addr = adr, .flags = 0, .buf = data, .len = len }; - dprintk(3, ":"); - if (debug > 2) { - int i; - for (i = 0; i < len; i++) - pr_cont(" %02x", data[i]); - pr_cont("\n"); - } + dprintk(3, ": %*ph\n", len, data); + status = drxk_i2c_transfer(state, &msg, 1); if (status >= 0 && status != 1) status = -EIO; @@ -267,16 +262,7 @@ static int i2c_read(struct drxk_state *state, pr_err("i2c read error at addr 0x%02x\n", adr); return status; } - if (debug > 2) { - int i; - dprintk(2, ": read from"); - for (i = 0; i < len; i++) - pr_cont(" %02x", msg[i]); - pr_cont(", value = "); - for (i = 0; i < alen; i++) - pr_cont(" %02x", answ[i]); - pr_cont("\n"); - } + dprintk(3, ": read from %*ph, value = %*ph\n", len, msg, alen, answ); return 0; } @@ -441,13 +427,8 @@ static int write_block(struct drxk_state *state, u32 address, } memcpy(&state->chunk[adr_length], p_block, chunk); dprintk(2, "(0x%08x, 0x%02x)\n", address, flags); - if (debug > 1) { - int i; - if (p_block) - for (i = 0; i < chunk; i++) - pr_cont(" %02x", p_block[i]); - pr_cont("\n"); - } + if (p_block) + dprintk(2, "%*ph\n", chunk, p_block); status = i2c_write(state, state->demod_address, &state->chunk[0], chunk + adr_length); if (status < 0) { diff --git a/drivers/media/dvb-frontends/lgdt3305.c b/drivers/media/dvb-frontends/lgdt3305.c index 62d743988919..c15d3735d34c 100644 --- a/drivers/media/dvb-frontends/lgdt3305.c +++ b/drivers/media/dvb-frontends/lgdt3305.c @@ -10,7 +10,7 @@ #include <asm/div64.h> #include <linux/dvb/frontend.h> #include <linux/slab.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "lgdt3305.h" static int debug; diff --git a/drivers/media/dvb-frontends/lgdt3306a.c b/drivers/media/dvb-frontends/lgdt3306a.c index 70258884126b..3c6650f6e9a3 100644 --- a/drivers/media/dvb-frontends/lgdt3306a.c +++ b/drivers/media/dvb-frontends/lgdt3306a.c @@ -12,7 +12,7 @@ #include <asm/div64.h> #include <linux/kernel.h> #include <linux/dvb/frontend.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "lgdt3306a.h" #include <linux/i2c-mux.h> diff --git a/drivers/media/dvb-frontends/lgdt330x.c b/drivers/media/dvb-frontends/lgdt330x.c index 83565209c3b1..97a10996c7fa 100644 --- a/drivers/media/dvb-frontends/lgdt330x.c +++ b/drivers/media/dvb-frontends/lgdt330x.c @@ -28,7 +28,7 @@ #include <asm/byteorder.h> #include <media/dvb_frontend.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "lgdt330x_priv.h" #include "lgdt330x.h" diff --git a/drivers/media/dvb-frontends/m88ds3103_priv.h b/drivers/media/dvb-frontends/m88ds3103_priv.h index aa5306f40201..594ad9cbc2cc 100644 --- a/drivers/media/dvb-frontends/m88ds3103_priv.h +++ b/drivers/media/dvb-frontends/m88ds3103_priv.h @@ -10,7 +10,7 @@ #include <media/dvb_frontend.h> #include "m88ds3103.h" -#include <media/dvb_math.h> +#include <linux/int_log.h> #include <linux/firmware.h> #include <linux/i2c-mux.h> #include <linux/regmap.h> diff --git a/drivers/media/dvb-frontends/mb86a16.c b/drivers/media/dvb-frontends/mb86a16.c index d3e29937cf4c..3ec2cb4fa504 100644 --- a/drivers/media/dvb-frontends/mb86a16.c +++ b/drivers/media/dvb-frontends/mb86a16.c @@ -1487,10 +1487,12 @@ static int mb86a16_set_fe(struct mb86a16_state *state) } } - mb86a16_read(state, 0x15, &agcval); - mb86a16_read(state, 0x26, &cnmval); - dprintk(verbose, MB86A16_INFO, 1, "AGC = %02x CNM = %02x", agcval, cnmval); - + if (mb86a16_read(state, 0x15, &agcval) != 2 || mb86a16_read(state, 0x26, &cnmval) != 2) { + dprintk(verbose, MB86A16_ERROR, 1, "I2C transfer error"); + ret = -EREMOTEIO; + } else { + dprintk(verbose, MB86A16_INFO, 1, "AGC = %02x CNM = %02x", agcval, cnmval); + } return ret; } diff --git a/drivers/media/dvb-frontends/mn88443x.c b/drivers/media/dvb-frontends/mn88443x.c index 2ce5692bc22c..7a58f53ab999 100644 --- a/drivers/media/dvb-frontends/mn88443x.c +++ b/drivers/media/dvb-frontends/mn88443x.c @@ -8,9 +8,9 @@ #include <linux/clk.h> #include <linux/delay.h> #include <linux/gpio/consumer.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/regmap.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "mn88443x.h" diff --git a/drivers/media/dvb-frontends/mn88472_priv.h b/drivers/media/dvb-frontends/mn88472_priv.h index 337562723f88..41f14bd67bfd 100644 --- a/drivers/media/dvb-frontends/mn88472_priv.h +++ b/drivers/media/dvb-frontends/mn88472_priv.h @@ -9,7 +9,7 @@ #define MN88472_PRIV_H #include <media/dvb_frontend.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "mn88472.h" #include <linux/firmware.h> #include <linux/regmap.h> diff --git a/drivers/media/dvb-frontends/mn88473_priv.h b/drivers/media/dvb-frontends/mn88473_priv.h index eca7f4e2b769..e9daaacfa22f 100644 --- a/drivers/media/dvb-frontends/mn88473_priv.h +++ b/drivers/media/dvb-frontends/mn88473_priv.h @@ -9,7 +9,7 @@ #define MN88473_PRIV_H #include <media/dvb_frontend.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "mn88473.h" #include <linux/math64.h> #include <linux/firmware.h> diff --git a/drivers/media/dvb-frontends/or51132.c b/drivers/media/dvb-frontends/or51132.c index 24de1b115158..355f3598627b 100644 --- a/drivers/media/dvb-frontends/or51132.c +++ b/drivers/media/dvb-frontends/or51132.c @@ -27,7 +27,7 @@ #include <linux/slab.h> #include <asm/byteorder.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include <media/dvb_frontend.h> #include "or51132.h" diff --git a/drivers/media/dvb-frontends/or51211.c b/drivers/media/dvb-frontends/or51211.c index ddcaea5c9941..ae732dc5116e 100644 --- a/drivers/media/dvb-frontends/or51211.c +++ b/drivers/media/dvb-frontends/or51211.c @@ -26,7 +26,7 @@ #include <linux/slab.h> #include <asm/byteorder.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include <media/dvb_frontend.h> #include "or51211.h" diff --git a/drivers/media/dvb-frontends/rtl2830_priv.h b/drivers/media/dvb-frontends/rtl2830_priv.h index fae78ed78522..ae1fc24a4d84 100644 --- a/drivers/media/dvb-frontends/rtl2830_priv.h +++ b/drivers/media/dvb-frontends/rtl2830_priv.h @@ -9,7 +9,7 @@ #define RTL2830_PRIV_H #include <media/dvb_frontend.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "rtl2830.h" #include <linux/i2c-mux.h> #include <linux/math64.h> diff --git a/drivers/media/dvb-frontends/rtl2832_priv.h b/drivers/media/dvb-frontends/rtl2832_priv.h index 5f79f95b9475..f11ba038d5f0 100644 --- a/drivers/media/dvb-frontends/rtl2832_priv.h +++ b/drivers/media/dvb-frontends/rtl2832_priv.h @@ -14,7 +14,7 @@ #include <linux/bitops.h> #include <media/dvb_frontend.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "rtl2832.h" struct rtl2832_dev { diff --git a/drivers/media/dvb-frontends/si2165.c b/drivers/media/dvb-frontends/si2165.c index 72810efd1a96..434d003bf397 100644 --- a/drivers/media/dvb-frontends/si2165.c +++ b/drivers/media/dvb-frontends/si2165.c @@ -19,7 +19,7 @@ #include <linux/regmap.h> #include <media/dvb_frontend.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "si2165_priv.h" #include "si2165.h" diff --git a/drivers/media/dvb-frontends/stv0367.c b/drivers/media/dvb-frontends/stv0367.c index 95e376f23506..a93f40617469 100644 --- a/drivers/media/dvb-frontends/stv0367.c +++ b/drivers/media/dvb-frontends/stv0367.c @@ -15,7 +15,7 @@ #include <linux/slab.h> #include <linux/i2c.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "stv0367.h" #include "stv0367_defs.h" diff --git a/drivers/media/dvb-frontends/tc90522.c b/drivers/media/dvb-frontends/tc90522.c index 879f028f9682..1f8cbf45554a 100644 --- a/drivers/media/dvb-frontends/tc90522.c +++ b/drivers/media/dvb-frontends/tc90522.c @@ -21,7 +21,7 @@ #include <linux/kernel.h> #include <linux/math64.h> #include <linux/dvb/frontend.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "tc90522.h" #define TC90522_I2C_THRU_REG 0xfe diff --git a/drivers/media/dvb-frontends/tda10048.c b/drivers/media/dvb-frontends/tda10048.c index 0b3f6999515e..3cb4e5270e4f 100644 --- a/drivers/media/dvb-frontends/tda10048.c +++ b/drivers/media/dvb-frontends/tda10048.c @@ -16,7 +16,7 @@ #include <linux/math64.h> #include <asm/div64.h> #include <media/dvb_frontend.h> -#include <media/dvb_math.h> +#include <linux/int_log.h> #include "tda10048.h" #define TDA10048_DEFAULT_FIRMWARE "dvb-fe-tda10048-1.0.fw" |