aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-04-28 10:47:45 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-08 21:04:40 -0400
commit3a4398f58c0a7b70b7debe36fd95cf37e9b2c0a1 (patch)
treec832041553fb2d6ff12eac52b95742536e859752 /drivers/media/dvb-frontends
parentcd7a67a4f18047ca7b8ce2f48b4c540d69c9b793 (diff)
[media] drxk_hard: use pr_info/pr_warn/pr_err/... macros
X-Patchwork-Delegate: mchehab@redhat.com replace all occurrences of printk(KERN_* by pr_info/pr_warn/pr_err/pr_debug/pr_cont macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r--drivers/media/dvb-frontends/drxk_hard.c182
1 files changed, 89 insertions, 93 deletions
diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c
index d2b331a46a6d..552bce5d8f92 100644
--- a/drivers/media/dvb-frontends/drxk_hard.c
+++ b/drivers/media/dvb-frontends/drxk_hard.c
@@ -21,6 +21,8 @@
21 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 21 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
22 */ 22 */
23 23
24#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
25
24#include <linux/kernel.h> 26#include <linux/kernel.h>
25#include <linux/module.h> 27#include <linux/module.h>
26#include <linux/moduleparam.h> 28#include <linux/moduleparam.h>
@@ -264,7 +266,7 @@ static int i2c_write(struct drxk_state *state, u8 adr, u8 *data, int len)
264 status = -EIO; 266 status = -EIO;
265 267
266 if (status < 0) 268 if (status < 0)
267 printk(KERN_ERR "drxk: i2c write error at addr 0x%02x\n", adr); 269 pr_err("i2c write error at addr 0x%02x\n", adr);
268 270
269 return status; 271 return status;
270} 272}
@@ -287,7 +289,7 @@ static int i2c_read(struct drxk_state *state,
287 if (status >= 0) 289 if (status >= 0)
288 status = -EIO; 290 status = -EIO;
289 291
290 printk(KERN_ERR "drxk: i2c read error at addr 0x%02x\n", adr); 292 pr_err("i2c read error at addr 0x%02x\n", adr);
291 return status; 293 return status;
292 } 294 }
293 if (debug > 2) { 295 if (debug > 2) {
@@ -474,7 +476,7 @@ static int write_block(struct drxk_state *state, u32 address,
474 status = i2c_write(state, state->demod_address, 476 status = i2c_write(state, state->demod_address,
475 &state->chunk[0], chunk + adr_length); 477 &state->chunk[0], chunk + adr_length);
476 if (status < 0) { 478 if (status < 0) {
477 printk(KERN_ERR "drxk: %s: i2c write error at addr 0x%02x\n", 479 pr_err("%s: i2c write error at addr 0x%02x\n",
478 __func__, address); 480 __func__, address);
479 break; 481 break;
480 } 482 }
@@ -531,7 +533,7 @@ static int power_up_device(struct drxk_state *state)
531 533
532error: 534error:
533 if (status < 0) 535 if (status < 0)
534 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 536 pr_err("Error %d on %s\n", status, __func__);
535 537
536 return status; 538 return status;
537} 539}
@@ -800,7 +802,7 @@ static int drxx_open(struct drxk_state *state)
800 status = write16(state, SIO_TOP_COMM_KEY__A, key); 802 status = write16(state, SIO_TOP_COMM_KEY__A, key);
801error: 803error:
802 if (status < 0) 804 if (status < 0)
803 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 805 pr_err("Error %d on %s\n", status, __func__);
804 return status; 806 return status;
805} 807}
806 808
@@ -845,7 +847,7 @@ static int get_device_capabilities(struct drxk_state *state)
845 state->m_osc_clock_freq = 20250; 847 state->m_osc_clock_freq = 20250;
846 break; 848 break;
847 default: 849 default:
848 printk(KERN_ERR "drxk: Clock Frequency is unknown\n"); 850 pr_err("Clock Frequency is unknown\n");
849 return -EINVAL; 851 return -EINVAL;
850 } 852 }
851 /* 853 /*
@@ -856,7 +858,7 @@ static int get_device_capabilities(struct drxk_state *state)
856 if (status < 0) 858 if (status < 0)
857 goto error; 859 goto error;
858 860
859 printk(KERN_INFO "drxk: status = 0x%08x\n", sio_top_jtagid_lo); 861 pr_info("status = 0x%08x\n", sio_top_jtagid_lo);
860 862
861 /* driver 0.9.0 */ 863 /* driver 0.9.0 */
862 switch ((sio_top_jtagid_lo >> 29) & 0xF) { 864 switch ((sio_top_jtagid_lo >> 29) & 0xF) {
@@ -875,8 +877,7 @@ static int get_device_capabilities(struct drxk_state *state)
875 default: 877 default:
876 state->m_device_spin = DRXK_SPIN_UNKNOWN; 878 state->m_device_spin = DRXK_SPIN_UNKNOWN;
877 status = -EINVAL; 879 status = -EINVAL;
878 printk(KERN_ERR "drxk: Spin %d unknown\n", 880 pr_err("Spin %d unknown\n", (sio_top_jtagid_lo >> 29) & 0xF);
879 (sio_top_jtagid_lo >> 29) & 0xF);
880 goto error2; 881 goto error2;
881 } 882 }
882 switch ((sio_top_jtagid_lo >> 12) & 0xFF) { 883 switch ((sio_top_jtagid_lo >> 12) & 0xFF) {
@@ -985,21 +986,20 @@ static int get_device_capabilities(struct drxk_state *state)
985 state->m_has_irqn = false; 986 state->m_has_irqn = false;
986 break; 987 break;
987 default: 988 default:
988 printk(KERN_ERR "drxk: DeviceID 0x%02x not supported\n", 989 pr_err("DeviceID 0x%02x not supported\n",
989 ((sio_top_jtagid_lo >> 12) & 0xFF)); 990 ((sio_top_jtagid_lo >> 12) & 0xFF));
990 status = -EINVAL; 991 status = -EINVAL;
991 goto error2; 992 goto error2;
992 } 993 }
993 994
994 printk(KERN_INFO 995 pr_info("detected a drx-39%02xk, spin %s, xtal %d.%03d MHz\n",
995 "drxk: detected a drx-39%02xk, spin %s, xtal %d.%03d MHz\n",
996 ((sio_top_jtagid_lo >> 12) & 0xFF), spin, 996 ((sio_top_jtagid_lo >> 12) & 0xFF), spin,
997 state->m_osc_clock_freq / 1000, 997 state->m_osc_clock_freq / 1000,
998 state->m_osc_clock_freq % 1000); 998 state->m_osc_clock_freq % 1000);
999 999
1000error: 1000error:
1001 if (status < 0) 1001 if (status < 0)
1002 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1002 pr_err("Error %d on %s\n", status, __func__);
1003 1003
1004error2: 1004error2:
1005 return status; 1005 return status;
@@ -1042,7 +1042,7 @@ static int hi_command(struct drxk_state *state, u16 cmd, u16 *p_result)
1042 } 1042 }
1043error: 1043error:
1044 if (status < 0) 1044 if (status < 0)
1045 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1045 pr_err("Error %d on %s\n", status, __func__);
1046 1046
1047 return status; 1047 return status;
1048} 1048}
@@ -1081,7 +1081,7 @@ static int hi_cfg_command(struct drxk_state *state)
1081error: 1081error:
1082 mutex_unlock(&state->mutex); 1082 mutex_unlock(&state->mutex);
1083 if (status < 0) 1083 if (status < 0)
1084 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1084 pr_err("Error %d on %s\n", status, __func__);
1085 return status; 1085 return status;
1086} 1086}
1087 1087
@@ -1244,7 +1244,7 @@ static int mpegts_configure_pins(struct drxk_state *state, bool mpeg_enable)
1244 status = write16(state, SIO_TOP_COMM_KEY__A, 0x0000); 1244 status = write16(state, SIO_TOP_COMM_KEY__A, 0x0000);
1245error: 1245error:
1246 if (status < 0) 1246 if (status < 0)
1247 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1247 pr_err("Error %d on %s\n", status, __func__);
1248 return status; 1248 return status;
1249} 1249}
1250 1250
@@ -1287,13 +1287,13 @@ static int bl_chain_cmd(struct drxk_state *state,
1287 ((time_is_after_jiffies(end)))); 1287 ((time_is_after_jiffies(end))));
1288 1288
1289 if (bl_status == 0x1) { 1289 if (bl_status == 0x1) {
1290 printk(KERN_ERR "drxk: SIO not ready\n"); 1290 pr_err("SIO not ready\n");
1291 status = -EINVAL; 1291 status = -EINVAL;
1292 goto error2; 1292 goto error2;
1293 } 1293 }
1294error: 1294error:
1295 if (status < 0) 1295 if (status < 0)
1296 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1296 pr_err("Error %d on %s\n", status, __func__);
1297error2: 1297error2:
1298 mutex_unlock(&state->mutex); 1298 mutex_unlock(&state->mutex);
1299 return status; 1299 return status;
@@ -1349,13 +1349,13 @@ static int download_microcode(struct drxk_state *state,
1349 offset += sizeof(u16); 1349 offset += sizeof(u16);
1350 1350
1351 if (offset + block_size > length) { 1351 if (offset + block_size > length) {
1352 printk(KERN_ERR "drxk: Firmware is corrupted.\n"); 1352 pr_err("Firmware is corrupted.\n");
1353 return -EINVAL; 1353 return -EINVAL;
1354 } 1354 }
1355 1355
1356 status = write_block(state, address, block_size, p_src); 1356 status = write_block(state, address, block_size, p_src);
1357 if (status < 0) { 1357 if (status < 0) {
1358 printk(KERN_ERR "drxk: Error %d while loading firmware\n", status); 1358 pr_err("Error %d while loading firmware\n", status);
1359 break; 1359 break;
1360 } 1360 }
1361 p_src += block_size; 1361 p_src += block_size;
@@ -1395,7 +1395,7 @@ static int dvbt_enable_ofdm_token_ring(struct drxk_state *state, bool enable)
1395 msleep(1); 1395 msleep(1);
1396 } while (1); 1396 } while (1);
1397 if (data != desired_status) { 1397 if (data != desired_status) {
1398 printk(KERN_ERR "drxk: SIO not ready\n"); 1398 pr_err("SIO not ready\n");
1399 return -EINVAL; 1399 return -EINVAL;
1400 } 1400 }
1401 return status; 1401 return status;
@@ -1427,7 +1427,7 @@ static int mpegts_stop(struct drxk_state *state)
1427 1427
1428error: 1428error:
1429 if (status < 0) 1429 if (status < 0)
1430 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1430 pr_err("Error %d on %s\n", status, __func__);
1431 1431
1432 return status; 1432 return status;
1433} 1433}
@@ -1451,7 +1451,7 @@ static int scu_command(struct drxk_state *state,
1451 1451
1452 if ((cmd == 0) || ((parameter_len > 0) && (parameter == NULL)) || 1452 if ((cmd == 0) || ((parameter_len > 0) && (parameter == NULL)) ||
1453 ((result_len > 0) && (result == NULL))) { 1453 ((result_len > 0) && (result == NULL))) {
1454 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1454 pr_err("Error %d on %s\n", status, __func__);
1455 return status; 1455 return status;
1456 } 1456 }
1457 1457
@@ -1477,7 +1477,7 @@ static int scu_command(struct drxk_state *state,
1477 goto error; 1477 goto error;
1478 } while (!(cur_cmd == DRX_SCU_READY) && (time_is_after_jiffies(end))); 1478 } while (!(cur_cmd == DRX_SCU_READY) && (time_is_after_jiffies(end)));
1479 if (cur_cmd != DRX_SCU_READY) { 1479 if (cur_cmd != DRX_SCU_READY) {
1480 printk(KERN_ERR "drxk: SCU not ready\n"); 1480 pr_err("SCU not ready\n");
1481 status = -EIO; 1481 status = -EIO;
1482 goto error2; 1482 goto error2;
1483 } 1483 }
@@ -1515,7 +1515,7 @@ static int scu_command(struct drxk_state *state,
1515 sprintf(errname, "ERROR: %d\n", err); 1515 sprintf(errname, "ERROR: %d\n", err);
1516 p = errname; 1516 p = errname;
1517 } 1517 }
1518 printk(KERN_ERR "drxk: %s while sending cmd 0x%04x with params:", p, cmd); 1518 pr_err("%s while sending cmd 0x%04x with params:", p, cmd);
1519 print_hex_dump_bytes("drxk: ", DUMP_PREFIX_NONE, buffer, cnt); 1519 print_hex_dump_bytes("drxk: ", DUMP_PREFIX_NONE, buffer, cnt);
1520 status = -EINVAL; 1520 status = -EINVAL;
1521 goto error2; 1521 goto error2;
@@ -1523,7 +1523,7 @@ static int scu_command(struct drxk_state *state,
1523 1523
1524error: 1524error:
1525 if (status < 0) 1525 if (status < 0)
1526 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1526 pr_err("Error %d on %s\n", status, __func__);
1527error2: 1527error2:
1528 mutex_unlock(&state->mutex); 1528 mutex_unlock(&state->mutex);
1529 return status; 1529 return status;
@@ -1559,7 +1559,7 @@ static int set_iqm_af(struct drxk_state *state, bool active)
1559 1559
1560error: 1560error:
1561 if (status < 0) 1561 if (status < 0)
1562 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1562 pr_err("Error %d on %s\n", status, __func__);
1563 return status; 1563 return status;
1564} 1564}
1565 1565
@@ -1664,7 +1664,7 @@ static int ctrl_power_mode(struct drxk_state *state, enum drx_power_mode *mode)
1664 1664
1665error: 1665error:
1666 if (status < 0) 1666 if (status < 0)
1667 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1667 pr_err("Error %d on %s\n", status, __func__);
1668 1668
1669 return status; 1669 return status;
1670} 1670}
@@ -1716,7 +1716,7 @@ static int power_down_dvbt(struct drxk_state *state, bool set_power_mode)
1716 } 1716 }
1717error: 1717error:
1718 if (status < 0) 1718 if (status < 0)
1719 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1719 pr_err("Error %d on %s\n", status, __func__);
1720 return status; 1720 return status;
1721} 1721}
1722 1722
@@ -1796,7 +1796,7 @@ static int setoperation_mode(struct drxk_state *state,
1796 } 1796 }
1797error: 1797error:
1798 if (status < 0) 1798 if (status < 0)
1799 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1799 pr_err("Error %d on %s\n", status, __func__);
1800 return status; 1800 return status;
1801} 1801}
1802 1802
@@ -1847,7 +1847,7 @@ static int start(struct drxk_state *state, s32 offset_freq,
1847 } 1847 }
1848error: 1848error:
1849 if (status < 0) 1849 if (status < 0)
1850 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1850 pr_err("Error %d on %s\n", status, __func__);
1851 return status; 1851 return status;
1852} 1852}
1853 1853
@@ -1885,7 +1885,7 @@ static int get_lock_status(struct drxk_state *state, u32 *p_lock_status)
1885 } 1885 }
1886error: 1886error:
1887 if (status < 0) 1887 if (status < 0)
1888 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1888 pr_err("Error %d on %s\n", status, __func__);
1889 return status; 1889 return status;
1890} 1890}
1891 1891
@@ -1906,7 +1906,7 @@ static int mpegts_start(struct drxk_state *state)
1906 status = write16(state, FEC_OC_SNC_UNLOCK__A, 1); 1906 status = write16(state, FEC_OC_SNC_UNLOCK__A, 1);
1907error: 1907error:
1908 if (status < 0) 1908 if (status < 0)
1909 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1909 pr_err("Error %d on %s\n", status, __func__);
1910 return status; 1910 return status;
1911} 1911}
1912 1912
@@ -1952,7 +1952,7 @@ static int mpegts_dto_init(struct drxk_state *state)
1952 status = write16(state, FEC_OC_SNC_HWM__A, 12); 1952 status = write16(state, FEC_OC_SNC_HWM__A, 12);
1953error: 1953error:
1954 if (status < 0) 1954 if (status < 0)
1955 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 1955 pr_err("Error %d on %s\n", status, __func__);
1956 1956
1957 return status; 1957 return status;
1958} 1958}
@@ -2089,7 +2089,7 @@ static int mpegts_dto_setup(struct drxk_state *state,
2089 status = write16(state, FEC_OC_TMD_MODE__A, fec_oc_tmd_mode); 2089 status = write16(state, FEC_OC_TMD_MODE__A, fec_oc_tmd_mode);
2090error: 2090error:
2091 if (status < 0) 2091 if (status < 0)
2092 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 2092 pr_err("Error %d on %s\n", status, __func__);
2093 return status; 2093 return status;
2094} 2094}
2095 2095
@@ -2269,7 +2269,7 @@ static int set_agc_rf(struct drxk_state *state,
2269 } 2269 }
2270error: 2270error:
2271 if (status < 0) 2271 if (status < 0)
2272 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 2272 pr_err("Error %d on %s\n", status, __func__);
2273 return status; 2273 return status;
2274} 2274}
2275 2275
@@ -2397,7 +2397,7 @@ static int set_agc_if(struct drxk_state *state,
2397 status = write16(state, SCU_RAM_AGC_INGAIN_TGT_MIN__A, p_agc_cfg->top); 2397 status = write16(state, SCU_RAM_AGC_INGAIN_TGT_MIN__A, p_agc_cfg->top);
2398error: 2398error:
2399 if (status < 0) 2399 if (status < 0)
2400 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 2400 pr_err("Error %d on %s\n", status, __func__);
2401 return status; 2401 return status;
2402} 2402}
2403 2403
@@ -2418,7 +2418,7 @@ static int get_qam_signal_to_noise(struct drxk_state *state,
2418 /* get the register value needed for MER */ 2418 /* get the register value needed for MER */
2419 status = read16(state, QAM_SL_ERR_POWER__A, &qam_sl_err_power); 2419 status = read16(state, QAM_SL_ERR_POWER__A, &qam_sl_err_power);
2420 if (status < 0) { 2420 if (status < 0) {
2421 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 2421 pr_err("Error %d on %s\n", status, __func__);
2422 return -EINVAL; 2422 return -EINVAL;
2423 } 2423 }
2424 2424
@@ -2545,7 +2545,7 @@ static int get_dvbt_signal_to_noise(struct drxk_state *state,
2545 2545
2546error: 2546error:
2547 if (status < 0) 2547 if (status < 0)
2548 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 2548 pr_err("Error %d on %s\n", status, __func__);
2549 return status; 2549 return status;
2550} 2550}
2551 2551
@@ -2740,7 +2740,7 @@ static int ConfigureI2CBridge(struct drxk_state *state, bool b_enable_bridge)
2740 2740
2741error: 2741error:
2742 if (status < 0) 2742 if (status < 0)
2743 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 2743 pr_err("Error %d on %s\n", status, __func__);
2744 return status; 2744 return status;
2745} 2745}
2746 2746
@@ -2758,7 +2758,7 @@ static int set_pre_saw(struct drxk_state *state,
2758 status = write16(state, IQM_AF_PDREF__A, p_pre_saw_cfg->reference); 2758 status = write16(state, IQM_AF_PDREF__A, p_pre_saw_cfg->reference);
2759error: 2759error:
2760 if (status < 0) 2760 if (status < 0)
2761 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 2761 pr_err("Error %d on %s\n", status, __func__);
2762 return status; 2762 return status;
2763} 2763}
2764 2764
@@ -2800,13 +2800,13 @@ static int bl_direct_cmd(struct drxk_state *state, u32 target_addr,
2800 goto error; 2800 goto error;
2801 } while ((bl_status == 0x1) && time_is_after_jiffies(end)); 2801 } while ((bl_status == 0x1) && time_is_after_jiffies(end));
2802 if (bl_status == 0x1) { 2802 if (bl_status == 0x1) {
2803 printk(KERN_ERR "drxk: SIO not ready\n"); 2803 pr_err("SIO not ready\n");
2804 status = -EINVAL; 2804 status = -EINVAL;
2805 goto error2; 2805 goto error2;
2806 } 2806 }
2807error: 2807error:
2808 if (status < 0) 2808 if (status < 0)
2809 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 2809 pr_err("Error %d on %s\n", status, __func__);
2810error2: 2810error2:
2811 mutex_unlock(&state->mutex); 2811 mutex_unlock(&state->mutex);
2812 return status; 2812 return status;
@@ -2847,7 +2847,7 @@ static int adc_sync_measurement(struct drxk_state *state, u16 *count)
2847 2847
2848error: 2848error:
2849 if (status < 0) 2849 if (status < 0)
2850 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 2850 pr_err("Error %d on %s\n", status, __func__);
2851 return status; 2851 return status;
2852} 2852}
2853 2853
@@ -2891,7 +2891,7 @@ static int adc_synchronization(struct drxk_state *state)
2891 status = -EINVAL; 2891 status = -EINVAL;
2892error: 2892error:
2893 if (status < 0) 2893 if (status < 0)
2894 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 2894 pr_err("Error %d on %s\n", status, __func__);
2895 return status; 2895 return status;
2896} 2896}
2897 2897
@@ -2957,7 +2957,7 @@ static int set_frequency_shifter(struct drxk_state *state,
2957 status = write32(state, IQM_FS_RATE_OFS_LO__A, 2957 status = write32(state, IQM_FS_RATE_OFS_LO__A,
2958 state->m_iqm_fs_rate_ofs); 2958 state->m_iqm_fs_rate_ofs);
2959 if (status < 0) 2959 if (status < 0)
2960 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 2960 pr_err("Error %d on %s\n", status, __func__);
2961 return status; 2961 return status;
2962} 2962}
2963 2963
@@ -2992,7 +2992,8 @@ static int init_agc(struct drxk_state *state, bool is_dtv)
2992 2992
2993 /* AGCInit() not available for DVBT; init done in microcode */ 2993 /* AGCInit() not available for DVBT; init done in microcode */
2994 if (!is_qam(state)) { 2994 if (!is_qam(state)) {
2995 printk(KERN_ERR "drxk: %s: mode %d is not DVB-C\n", __func__, state->m_operation_mode); 2995 pr_err("%s: mode %d is not DVB-C\n",
2996 __func__, state->m_operation_mode);
2996 return -EINVAL; 2997 return -EINVAL;
2997 } 2998 }
2998 2999
@@ -3145,7 +3146,7 @@ static int init_agc(struct drxk_state *state, bool is_dtv)
3145 status = write16(state, SCU_RAM_AGC_KI__A, data); 3146 status = write16(state, SCU_RAM_AGC_KI__A, data);
3146error: 3147error:
3147 if (status < 0) 3148 if (status < 0)
3148 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 3149 pr_err("Error %d on %s\n", status, __func__);
3149 return status; 3150 return status;
3150} 3151}
3151 3152
@@ -3159,7 +3160,7 @@ static int dvbtqam_get_acc_pkt_err(struct drxk_state *state, u16 *packet_err)
3159 else 3160 else
3160 status = read16(state, SCU_RAM_FEC_ACCUM_PKT_FAILURES__A, packet_err); 3161 status = read16(state, SCU_RAM_FEC_ACCUM_PKT_FAILURES__A, packet_err);
3161 if (status < 0) 3162 if (status < 0)
3162 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 3163 pr_err("Error %d on %s\n", status, __func__);
3163 return status; 3164 return status;
3164} 3165}
3165 3166
@@ -3279,7 +3280,7 @@ static int dvbt_sc_command(struct drxk_state *state,
3279 } /* switch (cmd->cmd) */ 3280 } /* switch (cmd->cmd) */
3280error: 3281error:
3281 if (status < 0) 3282 if (status < 0)
3282 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 3283 pr_err("Error %d on %s\n", status, __func__);
3283 return status; 3284 return status;
3284} 3285}
3285 3286
@@ -3291,7 +3292,7 @@ static int power_up_dvbt(struct drxk_state *state)
3291 dprintk(1, "\n"); 3292 dprintk(1, "\n");
3292 status = ctrl_power_mode(state, &power_mode); 3293 status = ctrl_power_mode(state, &power_mode);
3293 if (status < 0) 3294 if (status < 0)
3294 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 3295 pr_err("Error %d on %s\n", status, __func__);
3295 return status; 3296 return status;
3296} 3297}
3297 3298
@@ -3305,7 +3306,7 @@ static int dvbt_ctrl_set_inc_enable(struct drxk_state *state, bool *enabled)
3305 else 3306 else
3306 status = write16(state, IQM_CF_BYPASSDET__A, 1); 3307 status = write16(state, IQM_CF_BYPASSDET__A, 1);
3307 if (status < 0) 3308 if (status < 0)
3308 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 3309 pr_err("Error %d on %s\n", status, __func__);
3309 return status; 3310 return status;
3310} 3311}
3311 3312
@@ -3325,7 +3326,7 @@ static int dvbt_ctrl_set_fr_enable(struct drxk_state *state, bool *enabled)
3325 status = write16(state, OFDM_SC_RA_RAM_FR_THRES_8K__A, 0); 3326 status = write16(state, OFDM_SC_RA_RAM_FR_THRES_8K__A, 0);
3326 } 3327 }
3327 if (status < 0) 3328 if (status < 0)
3328 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 3329 pr_err("Error %d on %s\n", status, __func__);
3329 3330
3330 return status; 3331 return status;
3331} 3332}
@@ -3361,7 +3362,7 @@ static int dvbt_ctrl_set_echo_threshold(struct drxk_state *state,
3361 status = write16(state, OFDM_SC_RA_RAM_ECHO_THRES__A, data); 3362 status = write16(state, OFDM_SC_RA_RAM_ECHO_THRES__A, data);
3362error: 3363error:
3363 if (status < 0) 3364 if (status < 0)
3364 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 3365 pr_err("Error %d on %s\n", status, __func__);
3365 return status; 3366 return status;
3366} 3367}
3367 3368
@@ -3384,7 +3385,7 @@ static int dvbt_ctrl_set_sqi_speed(struct drxk_state *state,
3384 (u16) *speed); 3385 (u16) *speed);
3385error: 3386error:
3386 if (status < 0) 3387 if (status < 0)
3387 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 3388 pr_err("Error %d on %s\n", status, __func__);
3388 return status; 3389 return status;
3389} 3390}
3390 3391
@@ -3423,7 +3424,7 @@ static int dvbt_activate_presets(struct drxk_state *state)
3423 status = write16(state, SCU_RAM_AGC_INGAIN_TGT_MAX__A, state->m_dvbt_if_agc_cfg.ingain_tgt_max); 3424 status = write16(state, SCU_RAM_AGC_INGAIN_TGT_MAX__A, state->m_dvbt_if_agc_cfg.ingain_tgt_max);
3424error: 3425error:
3425 if (status < 0) 3426 if (status < 0)
3426 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 3427 pr_err("Error %d on %s\n", status, __func__);
3427 return status; 3428 return status;
3428} 3429}
3429 3430
@@ -3629,7 +3630,7 @@ static int set_dvbt_standard(struct drxk_state *state,
3629 3630
3630error: 3631error:
3631 if (status < 0) 3632 if (status < 0)
3632 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 3633 pr_err("Error %d on %s\n", status, __func__);
3633 return status; 3634 return status;
3634} 3635}
3635 3636
@@ -3661,7 +3662,7 @@ static int dvbt_start(struct drxk_state *state)
3661 goto error; 3662 goto error;
3662error: 3663error:
3663 if (status < 0) 3664 if (status < 0)
3664 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 3665 pr_err("Error %d on %s\n", status, __func__);
3665 return status; 3666 return status;
3666} 3667}
3667 3668
@@ -3980,7 +3981,7 @@ static int set_dvbt(struct drxk_state *state, u16 intermediate_freqk_hz,
3980 status = dvbt_ctrl_set_sqi_speed(state, &state->m_sqi_speed); 3981 status = dvbt_ctrl_set_sqi_speed(state, &state->m_sqi_speed);
3981error: 3982error:
3982 if (status < 0) 3983 if (status < 0)
3983 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 3984 pr_err("Error %d on %s\n", status, __func__);
3984 3985
3985 return status; 3986 return status;
3986} 3987}
@@ -4031,7 +4032,7 @@ static int get_dvbt_lock_status(struct drxk_state *state, u32 *p_lock_status)
4031 *p_lock_status = NEVER_LOCK; 4032 *p_lock_status = NEVER_LOCK;
4032end: 4033end:
4033 if (status < 0) 4034 if (status < 0)
4034 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 4035 pr_err("Error %d on %s\n", status, __func__);
4035 4036
4036 return status; 4037 return status;
4037} 4038}
@@ -4044,7 +4045,7 @@ static int power_up_qam(struct drxk_state *state)
4044 dprintk(1, "\n"); 4045 dprintk(1, "\n");
4045 status = ctrl_power_mode(state, &power_mode); 4046 status = ctrl_power_mode(state, &power_mode);
4046 if (status < 0) 4047 if (status < 0)
4047 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 4048 pr_err("Error %d on %s\n", status, __func__);
4048 4049
4049 return status; 4050 return status;
4050} 4051}
@@ -4079,7 +4080,7 @@ static int power_down_qam(struct drxk_state *state)
4079 4080
4080error: 4081error:
4081 if (status < 0) 4082 if (status < 0)
4082 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 4083 pr_err("Error %d on %s\n", status, __func__);
4083 4084
4084 return status; 4085 return status;
4085} 4086}
@@ -4167,7 +4168,7 @@ static int set_qam_measurement(struct drxk_state *state,
4167 status = write16(state, FEC_OC_SNC_FAIL_PERIOD__A, fec_rs_period); 4168 status = write16(state, FEC_OC_SNC_FAIL_PERIOD__A, fec_rs_period);
4168error: 4169error:
4169 if (status < 0) 4170 if (status < 0)
4170 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 4171 pr_err("Error %d on %s\n", status, __func__);
4171 return status; 4172 return status;
4172} 4173}
4173 4174
@@ -4353,7 +4354,7 @@ static int set_qam16(struct drxk_state *state)
4353 4354
4354error: 4355error:
4355 if (status < 0) 4356 if (status < 0)
4356 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 4357 pr_err("Error %d on %s\n", status, __func__);
4357 return status; 4358 return status;
4358} 4359}
4359 4360
@@ -4548,7 +4549,7 @@ static int set_qam32(struct drxk_state *state)
4548 status = write16(state, SCU_RAM_QAM_FSM_LCAVG_OFFSET5__A, (u16) -86); 4549 status = write16(state, SCU_RAM_QAM_FSM_LCAVG_OFFSET5__A, (u16) -86);
4549error: 4550error:
4550 if (status < 0) 4551 if (status < 0)
4551 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 4552 pr_err("Error %d on %s\n", status, __func__);
4552 return status; 4553 return status;
4553} 4554}
4554 4555
@@ -4741,7 +4742,7 @@ static int set_qam64(struct drxk_state *state)
4741 status = write16(state, SCU_RAM_QAM_FSM_LCAVG_OFFSET5__A, (u16) -80); 4742 status = write16(state, SCU_RAM_QAM_FSM_LCAVG_OFFSET5__A, (u16) -80);
4742error: 4743error:
4743 if (status < 0) 4744 if (status < 0)
4744 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 4745 pr_err("Error %d on %s\n", status, __func__);
4745 4746
4746 return status; 4747 return status;
4747} 4748}
@@ -4937,7 +4938,7 @@ static int set_qam128(struct drxk_state *state)
4937 status = write16(state, SCU_RAM_QAM_FSM_LCAVG_OFFSET5__A, (u16) -23); 4938 status = write16(state, SCU_RAM_QAM_FSM_LCAVG_OFFSET5__A, (u16) -23);
4938error: 4939error:
4939 if (status < 0) 4940 if (status < 0)
4940 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 4941 pr_err("Error %d on %s\n", status, __func__);
4941 4942
4942 return status; 4943 return status;
4943} 4944}
@@ -5132,7 +5133,7 @@ static int set_qam256(struct drxk_state *state)
5132 status = write16(state, SCU_RAM_QAM_FSM_LCAVG_OFFSET5__A, (u16) -8); 5133 status = write16(state, SCU_RAM_QAM_FSM_LCAVG_OFFSET5__A, (u16) -8);
5133error: 5134error:
5134 if (status < 0) 5135 if (status < 0)
5135 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 5136 pr_err("Error %d on %s\n", status, __func__);
5136 return status; 5137 return status;
5137} 5138}
5138 5139
@@ -5158,7 +5159,7 @@ static int qam_reset_qam(struct drxk_state *state)
5158 status = scu_command(state, SCU_RAM_COMMAND_STANDARD_QAM | SCU_RAM_COMMAND_CMD_DEMOD_RESET, 0, NULL, 1, &cmd_result); 5159 status = scu_command(state, SCU_RAM_COMMAND_STANDARD_QAM | SCU_RAM_COMMAND_CMD_DEMOD_RESET, 0, NULL, 1, &cmd_result);
5159error: 5160error:
5160 if (status < 0) 5161 if (status < 0)
5161 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 5162 pr_err("Error %d on %s\n", status, __func__);
5162 return status; 5163 return status;
5163} 5164}
5164 5165
@@ -5228,7 +5229,7 @@ static int qam_set_symbolrate(struct drxk_state *state)
5228 5229
5229error: 5230error:
5230 if (status < 0) 5231 if (status < 0)
5231 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 5232 pr_err("Error %d on %s\n", status, __func__);
5232 return status; 5233 return status;
5233} 5234}
5234 5235
@@ -5253,7 +5254,7 @@ static int get_qam_lock_status(struct drxk_state *state, u32 *p_lock_status)
5253 SCU_RAM_COMMAND_CMD_DEMOD_GET_LOCK, 0, NULL, 2, 5254 SCU_RAM_COMMAND_CMD_DEMOD_GET_LOCK, 0, NULL, 2,
5254 result); 5255 result);
5255 if (status < 0) 5256 if (status < 0)
5256 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 5257 pr_err("Error %d on %s\n", status, __func__);
5257 5258
5258 if (result[1] < SCU_RAM_QAM_LOCKED_LOCKED_DEMOD_LOCKED) { 5259 if (result[1] < SCU_RAM_QAM_LOCKED_LOCKED_DEMOD_LOCKED) {
5259 /* 0x0000 NOT LOCKED */ 5260 /* 0x0000 NOT LOCKED */
@@ -5324,15 +5325,14 @@ static int qam_demodulator_command(struct drxk_state *state,
5324 number_of_parameters, set_param_parameters, 5325 number_of_parameters, set_param_parameters,
5325 1, &cmd_result); 5326 1, &cmd_result);
5326 } else { 5327 } else {
5327 printk(KERN_WARNING "drxk: Unknown QAM demodulator parameter " 5328 pr_warn("Unknown QAM demodulator parameter count %d\n",
5328 "count %d\n", number_of_parameters); 5329 number_of_parameters);
5329 status = -EINVAL; 5330 status = -EINVAL;
5330 } 5331 }
5331 5332
5332error: 5333error:
5333 if (status < 0) 5334 if (status < 0)
5334 printk(KERN_WARNING "drxk: Warning %d on %s\n", 5335 pr_warn("Warning %d on %s\n", status, __func__);
5335 status, __func__);
5336 return status; 5336 return status;
5337} 5337}
5338 5338
@@ -5587,7 +5587,7 @@ static int set_qam(struct drxk_state *state, u16 intermediate_freqk_hz,
5587 5587
5588error: 5588error:
5589 if (status < 0) 5589 if (status < 0)
5590 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 5590 pr_err("Error %d on %s\n", status, __func__);
5591 return status; 5591 return status;
5592} 5592}
5593 5593
@@ -5749,7 +5749,7 @@ static int set_qam_standard(struct drxk_state *state,
5749 status = write16(state, SCU_COMM_EXEC__A, SCU_COMM_EXEC_ACTIVE); 5749 status = write16(state, SCU_COMM_EXEC__A, SCU_COMM_EXEC_ACTIVE);
5750error: 5750error:
5751 if (status < 0) 5751 if (status < 0)
5752 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 5752 pr_err("Error %d on %s\n", status, __func__);
5753 return status; 5753 return status;
5754} 5754}
5755 5755
@@ -5832,7 +5832,7 @@ static int write_gpio(struct drxk_state *state)
5832 status = write16(state, SIO_TOP_COMM_KEY__A, 0x0000); 5832 status = write16(state, SIO_TOP_COMM_KEY__A, 0x0000);
5833error: 5833error:
5834 if (status < 0) 5834 if (status < 0)
5835 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 5835 pr_err("Error %d on %s\n", status, __func__);
5836 return status; 5836 return status;
5837} 5837}
5838 5838
@@ -5857,7 +5857,7 @@ static int switch_antenna_to_qam(struct drxk_state *state)
5857 status = write_gpio(state); 5857 status = write_gpio(state);
5858 } 5858 }
5859 if (status < 0) 5859 if (status < 0)
5860 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 5860 pr_err("Error %d on %s\n", status, __func__);
5861 return status; 5861 return status;
5862} 5862}
5863 5863
@@ -5882,7 +5882,7 @@ static int switch_antenna_to_dvbt(struct drxk_state *state)
5882 status = write_gpio(state); 5882 status = write_gpio(state);
5883 } 5883 }
5884 if (status < 0) 5884 if (status < 0)
5885 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 5885 pr_err("Error %d on %s\n", status, __func__);
5886 return status; 5886 return status;
5887} 5887}
5888 5888
@@ -5919,7 +5919,7 @@ static int power_down_device(struct drxk_state *state)
5919 status = hi_cfg_command(state); 5919 status = hi_cfg_command(state);
5920error: 5920error:
5921 if (status < 0) 5921 if (status < 0)
5922 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 5922 pr_err("Error %d on %s\n", status, __func__);
5923 5923
5924 return status; 5924 return status;
5925} 5925}
@@ -6060,7 +6060,7 @@ static int init_drxk(struct drxk_state *state)
6060 if (status < 0) 6060 if (status < 0)
6061 goto error; 6061 goto error;
6062 6062
6063 printk(KERN_INFO "DRXK driver version %d.%d.%d\n", 6063 pr_info("DRXK driver version %d.%d.%d\n",
6064 DRXK_VERSION_MAJOR, DRXK_VERSION_MINOR, 6064 DRXK_VERSION_MAJOR, DRXK_VERSION_MINOR,
6065 DRXK_VERSION_PATCH); 6065 DRXK_VERSION_PATCH);
6066 6066
@@ -6128,7 +6128,7 @@ error:
6128 if (status < 0) { 6128 if (status < 0) {
6129 state->m_drxk_state = DRXK_NO_DEV; 6129 state->m_drxk_state = DRXK_NO_DEV;
6130 drxk_i2c_unlock(state); 6130 drxk_i2c_unlock(state);
6131 printk(KERN_ERR "drxk: Error %d on %s\n", status, __func__); 6131 pr_err("Error %d on %s\n", status, __func__);
6132 } 6132 }
6133 6133
6134 return status; 6134 return status;
@@ -6141,11 +6141,9 @@ static void load_firmware_cb(const struct firmware *fw,
6141 6141
6142 dprintk(1, ": %s\n", fw ? "firmware loaded" : "firmware not loaded"); 6142 dprintk(1, ": %s\n", fw ? "firmware loaded" : "firmware not loaded");
6143 if (!fw) { 6143 if (!fw) {
6144 printk(KERN_ERR 6144 pr_err("Could not load firmware file %s.\n",
6145 "drxk: Could not load firmware file %s.\n",
6146 state->microcode_name); 6145 state->microcode_name);
6147 printk(KERN_INFO 6146 pr_info("Copy %s to your hotplug directory!\n",
6148 "drxk: Copy %s to your hotplug directory!\n",
6149 state->microcode_name); 6147 state->microcode_name);
6150 state->microcode_name = NULL; 6148 state->microcode_name = NULL;
6151 6149
@@ -6219,8 +6217,7 @@ static int drxk_set_parameters(struct dvb_frontend *fe)
6219 return -EAGAIN; 6217 return -EAGAIN;
6220 6218
6221 if (!fe->ops.tuner_ops.get_if_frequency) { 6219 if (!fe->ops.tuner_ops.get_if_frequency) {
6222 printk(KERN_ERR 6220 pr_err("Error: get_if_frequency() not defined at tuner. Can't work without it!\n");
6223 "drxk: Error: get_if_frequency() not defined at tuner. Can't work without it!\n");
6224 return -EINVAL; 6221 return -EINVAL;
6225 } 6222 }
6226 6223
@@ -6704,8 +6701,7 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
6704 GFP_KERNEL, 6701 GFP_KERNEL,
6705 state, load_firmware_cb); 6702 state, load_firmware_cb);
6706 if (status < 0) { 6703 if (status < 0) {
6707 printk(KERN_ERR 6704 pr_err("failed to request a firmware\n");
6708 "drxk: failed to request a firmware\n");
6709 return NULL; 6705 return NULL;
6710 } 6706 }
6711 } 6707 }
@@ -6733,11 +6729,11 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
6733 p->post_bit_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE; 6729 p->post_bit_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
6734 p->post_bit_count.stat[0].scale = FE_SCALE_NOT_AVAILABLE; 6730 p->post_bit_count.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
6735 6731
6736 printk(KERN_INFO "drxk: frontend initialized.\n"); 6732 pr_info("frontend initialized.\n");
6737 return &state->frontend; 6733 return &state->frontend;
6738 6734
6739error: 6735error:
6740 printk(KERN_ERR "drxk: not found\n"); 6736 pr_err("not found\n");
6741 kfree(state); 6737 kfree(state);
6742 return NULL; 6738 return NULL;
6743} 6739}