Hi Brad, Thank you for the patch! Yet something to improve: [auto build test ERROR on linuxtv-media/master] [also build test ERROR on v4.20-rc7 next-20181220] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Brad-Love/Add-Hauppauge-HVR1955-1975-devices/20181221-122142 base: git://linuxtv.org/media_tree.git master config: x86_64-randconfig-x018-201850 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new ones prefixed by >>): drivers/media/usb/pvrusb2/pvrusb2-devattr.c:483:38: warning: 'struct pvr2_dvb_adapter' declared inside parameter list will not be visible outside of this definition or declaration static int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c: In function 'pvr2_si2157_attach': drivers/media/usb/pvrusb2/pvrusb2-devattr.c:485:9: error: variable 'si2157_config' has initializer but incomplete type struct si2157_config si2157_config = {}; ^~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:485:23: error: storage size of 'si2157_config' isn't known struct si2157_config si2157_config = {}; ^~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:488:25: error: dereferencing pointer to incomplete type 'struct pvr2_dvb_adapter' si2157_config.fe = adap->fe[0]; ^~ >> drivers/media/usb/pvrusb2/pvrusb2-devattr.c:490:27: error: implicit declaration of function 'dvb_module_probe'; did you mean 'module_put'? [-Werror=implicit-function-declaration] adap->i2c_client_tuner = dvb_module_probe("si2157", "si2177", ^~~~~~~~~~~~~~~~ module_put drivers/media/usb/pvrusb2/pvrusb2-devattr.c:485:23: warning: unused variable 'si2157_config' [-Wunused-variable] struct si2157_config si2157_config = {}; ^~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c: At top level: drivers/media/usb/pvrusb2/pvrusb2-devattr.c:505:38: warning: 'struct pvr2_dvb_adapter' declared inside parameter list will not be visible outside of this definition or declaration static int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap); ^~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:505:12: error: conflicting types for 'pvr2_si2157_attach' static int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap); ^~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:483:12: note: previous definition of 'pvr2_si2157_attach' was here static int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:506:39: warning: 'struct pvr2_dvb_adapter' declared inside parameter list will not be visible outside of this definition or declaration static int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap); ^~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:507:41: warning: 'struct pvr2_dvb_adapter' declared inside parameter list will not be visible outside of this definition or declaration static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap); ^~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:509:21: error: variable 'pvr2_160000_dvb_props' has initializer but incomplete type static const struct pvr2_dvb_props pvr2_160000_dvb_props = { ^~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:510:3: error: 'const struct pvr2_dvb_props' has no member named 'frontend_attach' .frontend_attach = pvr2_dual_fe_attach, ^~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:510:21: warning: excess elements in struct initializer .frontend_attach = pvr2_dual_fe_attach, ^~~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:510:21: note: (near initialization for 'pvr2_160000_dvb_props') drivers/media/usb/pvrusb2/pvrusb2-devattr.c:511:3: error: 'const struct pvr2_dvb_props' has no member named 'tuner_attach' .tuner_attach = pvr2_si2157_attach, ^~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:511:21: warning: excess elements in struct initializer .tuner_attach = pvr2_si2157_attach, ^~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:511:21: note: (near initialization for 'pvr2_160000_dvb_props') drivers/media/usb/pvrusb2/pvrusb2-devattr.c:540:21: error: variable 'pvr2_160111_dvb_props' has initializer but incomplete type static const struct pvr2_dvb_props pvr2_160111_dvb_props = { ^~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:541:3: error: 'const struct pvr2_dvb_props' has no member named 'frontend_attach' .frontend_attach = pvr2_lgdt3306a_attach, ^~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:541:21: warning: excess elements in struct initializer .frontend_attach = pvr2_lgdt3306a_attach, ^~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:541:21: note: (near initialization for 'pvr2_160111_dvb_props') drivers/media/usb/pvrusb2/pvrusb2-devattr.c:542:3: error: 'const struct pvr2_dvb_props' has no member named 'tuner_attach' .tuner_attach = pvr2_si2157_attach, ^~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:542:21: warning: excess elements in struct initializer .tuner_attach = pvr2_si2157_attach, ^~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:542:21: note: (near initialization for 'pvr2_160111_dvb_props') drivers/media/usb/pvrusb2/pvrusb2-devattr.c:571:38: warning: 'struct pvr2_dvb_adapter' declared inside parameter list will not be visible outside of this definition or declaration static int pvr2_si2168_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c: In function 'pvr2_si2168_attach': drivers/media/usb/pvrusb2/pvrusb2-devattr.c:573:9: error: variable 'si2168_config' has initializer but incomplete type struct si2168_config si2168_config = {}; ^~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:573:23: error: storage size of 'si2168_config' isn't known struct si2168_config si2168_config = {}; ^~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:578:26: error: dereferencing pointer to incomplete type 'struct pvr2_dvb_adapter' si2168_config.fe = &adap->fe[1]; ^~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:580:26: error: 'SI2168_TS_PARALLEL' undeclared (first use in this function) si2168_config.ts_mode = SI2168_TS_PARALLEL; /*2, 1-serial, 2-parallel.*/ ^~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:580:26: note: each undeclared identifier is reported only once for each function it appears in drivers/media/usb/pvrusb2/pvrusb2-devattr.c:573:23: warning: unused variable 'si2168_config' [-Wunused-variable] struct si2168_config si2168_config = {}; ^~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c: At top level: drivers/media/usb/pvrusb2/pvrusb2-devattr.c:595:41: warning: 'struct pvr2_dvb_adapter' declared inside parameter list will not be visible outside of this definition or declaration static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:595:12: error: conflicting types for 'pvr2_lgdt3306a_attach' static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:507:12: note: previous declaration of 'pvr2_lgdt3306a_attach' was here static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap); ^~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c: In function 'pvr2_lgdt3306a_attach': drivers/media/usb/pvrusb2/pvrusb2-devattr.c:597:26: error: storage size of 'lgdt3306a_config' isn't known struct lgdt3306a_config lgdt3306a_config; ^~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:603:29: error: dereferencing pointer to incomplete type 'struct pvr2_dvb_adapter' lgdt3306a_config.fe = &adap->fe[0]; ^~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:609:31: error: 'LGDT3306A_MPEG_PARALLEL' undeclared (first use in this function) lgdt3306a_config.mpeg_mode = LGDT3306A_MPEG_PARALLEL; ^~~~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:610:32: error: 'LGDT3306A_TPCLK_FALLING_EDGE' undeclared (first use in this function); did you mean 'LGDT3306A_MPEG_PARALLEL'? lgdt3306a_config.tpclk_edge = LGDT3306A_TPCLK_FALLING_EDGE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ LGDT3306A_MPEG_PARALLEL drivers/media/usb/pvrusb2/pvrusb2-devattr.c:611:38: error: 'LGDT3306A_TP_VALID_LOW' undeclared (first use in this function); did you mean 'LGDT3306A_MPEG_PARALLEL'? lgdt3306a_config.tpvalid_polarity = LGDT3306A_TP_VALID_LOW; ^~~~~~~~~~~~~~~~~~~~~~ LGDT3306A_MPEG_PARALLEL drivers/media/usb/pvrusb2/pvrusb2-devattr.c:612:31: warning: left-hand operand of comma expression has no effect [-Wunused-value] lgdt3306a_config.xtalMHz = 25, /* demod clock MHz; 24/25 supported */ ^ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:597:26: warning: unused variable 'lgdt3306a_config' [-Wunused-variable] struct lgdt3306a_config lgdt3306a_config; ^~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c: At top level: drivers/media/usb/pvrusb2/pvrusb2-devattr.c:624:39: warning: 'struct pvr2_dvb_adapter' declared inside parameter list will not be visible outside of this definition or declaration static int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:624:12: error: conflicting types for 'pvr2_dual_fe_attach' static int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:506:12: note: previous declaration of 'pvr2_dual_fe_attach' was here static int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap); ^~~~~~~~~~~~~~~~~~~ In file included from include/linux/string.h:6:0, from include/linux/uuid.h:20, from include/linux/mod_devicetable.h:13, from drivers/media/usb/pvrusb2/pvrusb2-devattr.h:19, from drivers/media/usb/pvrusb2/pvrusb2-devattr.c:25: drivers/media/usb/pvrusb2/pvrusb2-devattr.c: In function 'pvr2_dual_fe_attach': drivers/media/usb/pvrusb2/pvrusb2-devattr.c:628:28: error: passing argument 1 of 'pvr2_lgdt3306a_attach' from incompatible pointer type [-Werror=incompatible-pointer-types] if (pvr2_lgdt3306a_attach(adap) != 0) ^ include/linux/compiler.h:58:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/media/usb/pvrusb2/pvrusb2-devattr.c:628:2: note: in expansion of macro 'if' if (pvr2_lgdt3306a_attach(adap) != 0) ^~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:595:12: note: expected 'struct pvr2_dvb_adapter *' but argument is of type 'struct pvr2_dvb_adapter *' static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/string.h:6:0, from include/linux/uuid.h:20, from include/linux/mod_devicetable.h:13, from drivers/media/usb/pvrusb2/pvrusb2-devattr.h:19, from drivers/media/usb/pvrusb2/pvrusb2-devattr.c:25: drivers/media/usb/pvrusb2/pvrusb2-devattr.c:628:28: error: passing argument 1 of 'pvr2_lgdt3306a_attach' from incompatible pointer type [-Werror=incompatible-pointer-types] if (pvr2_lgdt3306a_attach(adap) != 0) ^ include/linux/compiler.h:58:42: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/media/usb/pvrusb2/pvrusb2-devattr.c:628:2: note: in expansion of macro 'if' if (pvr2_lgdt3306a_attach(adap) != 0) ^~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:595:12: note: expected 'struct pvr2_dvb_adapter *' but argument is of type 'struct pvr2_dvb_adapter *' static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/string.h:6:0, from include/linux/uuid.h:20, from include/linux/mod_devicetable.h:13, from drivers/media/usb/pvrusb2/pvrusb2-devattr.h:19, from drivers/media/usb/pvrusb2/pvrusb2-devattr.c:25: drivers/media/usb/pvrusb2/pvrusb2-devattr.c:628:28: error: passing argument 1 of 'pvr2_lgdt3306a_attach' from incompatible pointer type [-Werror=incompatible-pointer-types] if (pvr2_lgdt3306a_attach(adap) != 0) ^ include/linux/compiler.h:69:16: note: in definition of macro '__trace_if' ______r = !!(cond); \ ^~~~ >> drivers/media/usb/pvrusb2/pvrusb2-devattr.c:628:2: note: in expansion of macro 'if' if (pvr2_lgdt3306a_attach(adap) != 0) ^~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:595:12: note: expected 'struct pvr2_dvb_adapter *' but argument is of type 'struct pvr2_dvb_adapter *' static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/string.h:6:0, from include/linux/uuid.h:20, from include/linux/mod_devicetable.h:13, from drivers/media/usb/pvrusb2/pvrusb2-devattr.h:19, from drivers/media/usb/pvrusb2/pvrusb2-devattr.c:25: drivers/media/usb/pvrusb2/pvrusb2-devattr.c:631:25: error: passing argument 1 of 'pvr2_si2168_attach' from incompatible pointer type [-Werror=incompatible-pointer-types] if (pvr2_si2168_attach(adap) != 0) { ^ include/linux/compiler.h:58:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:631:2: note: in expansion of macro 'if' if (pvr2_si2168_attach(adap) != 0) { ^~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:571:12: note: expected 'struct pvr2_dvb_adapter *' but argument is of type 'struct pvr2_dvb_adapter *' static int pvr2_si2168_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~~~ In file included from include/linux/string.h:6:0, from include/linux/uuid.h:20, from include/linux/mod_devicetable.h:13, from drivers/media/usb/pvrusb2/pvrusb2-devattr.h:19, from drivers/media/usb/pvrusb2/pvrusb2-devattr.c:25: drivers/media/usb/pvrusb2/pvrusb2-devattr.c:631:25: error: passing argument 1 of 'pvr2_si2168_attach' from incompatible pointer type [-Werror=incompatible-pointer-types] if (pvr2_si2168_attach(adap) != 0) { ^ include/linux/compiler.h:58:42: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:631:2: note: in expansion of macro 'if' if (pvr2_si2168_attach(adap) != 0) { ^~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:571:12: note: expected 'struct pvr2_dvb_adapter *' but argument is of type 'struct pvr2_dvb_adapter *' static int pvr2_si2168_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~~~ In file included from include/linux/string.h:6:0, from include/linux/uuid.h:20, from include/linux/mod_devicetable.h:13, from drivers/media/usb/pvrusb2/pvrusb2-devattr.h:19, from drivers/media/usb/pvrusb2/pvrusb2-devattr.c:25: drivers/media/usb/pvrusb2/pvrusb2-devattr.c:631:25: error: passing argument 1 of 'pvr2_si2168_attach' from incompatible pointer type [-Werror=incompatible-pointer-types] if (pvr2_si2168_attach(adap) != 0) { ^ include/linux/compiler.h:69:16: note: in definition of macro '__trace_if' ______r = !!(cond); \ ^~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:631:2: note: in expansion of macro 'if' if (pvr2_si2168_attach(adap) != 0) { ^~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:571:12: note: expected 'struct pvr2_dvb_adapter *' but argument is of type 'struct pvr2_dvb_adapter *' static int pvr2_si2168_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:632:3: error: implicit declaration of function 'dvb_module_release'; did you mean 'complete_release'? [-Werror=implicit-function-declaration] dvb_module_release(adap->i2c_client_demod[0]); ^~~~~~~~~~~~~~~~~~ complete_release drivers/media/usb/pvrusb2/pvrusb2-devattr.c:632:26: error: dereferencing pointer to incomplete type 'struct pvr2_dvb_adapter' dvb_module_release(adap->i2c_client_demod[0]); ^~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c: At top level: drivers/media/usb/pvrusb2/pvrusb2-devattr.c:509:36: error: storage size of 'pvr2_160000_dvb_props' isn't known static const struct pvr2_dvb_props pvr2_160000_dvb_props = { ^~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:540:36: error: storage size of 'pvr2_160111_dvb_props' isn't known static const struct pvr2_dvb_props pvr2_160111_dvb_props = { ^~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:505:12: warning: 'pvr2_si2157_attach' used but never defined static int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap); ^~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:506:12: warning: 'pvr2_dual_fe_attach' used but never defined static int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap); ^~~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:507:12: warning: 'pvr2_lgdt3306a_attach' used but never defined static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap); ^~~~~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:624:12: warning: 'pvr2_dual_fe_attach' defined but not used [-Wunused-function] static int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~~~~ drivers/media/usb/pvrusb2/pvrusb2-devattr.c:483:12: warning: 'pvr2_si2157_attach' defined but not used [-Wunused-function] static int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap) ^~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +490 drivers/media/usb/pvrusb2/pvrusb2-devattr.c 482 483 static int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap) 484 { > 485 struct si2157_config si2157_config = {}; 486 487 si2157_config.inversion = 1; 488 si2157_config.fe = adap->fe[0]; 489 > 490 adap->i2c_client_tuner = dvb_module_probe("si2157", "si2177", 491 &adap->channel.hdw->i2c_adap, 492 0x60, &si2157_config); 493 494 if (!adap->i2c_client_tuner) 495 return -ENODEV; 496 497 return 0; 498 } 499 500 #define PVR2_FIRMWARE_160xxx "v4l-pvrusb2-160xxx-01.fw" 501 static const char *pvr2_fw1_names_160xxx[] = { 502 PVR2_FIRMWARE_160xxx, 503 }; 504 505 static int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap); 506 static int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap); 507 static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap); 508 509 static const struct pvr2_dvb_props pvr2_160000_dvb_props = { 510 .frontend_attach = pvr2_dual_fe_attach, 511 .tuner_attach = pvr2_si2157_attach, 512 }; 513 static const struct pvr2_device_client_desc pvr2_cli_160000[] = { 514 { .module_id = PVR2_CLIENT_ID_CX25840 }, 515 }; 516 static const struct pvr2_device_desc pvr2_device_160000 = { 517 .description = "WinTV HVR-1975 Model 160000", 518 .shortname = "160000", 519 .client_table.lst = pvr2_cli_160000, 520 .client_table.cnt = ARRAY_SIZE(pvr2_cli_160000), 521 .fx2_firmware.lst = pvr2_fw1_names_160xxx, 522 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_160xxx), 523 .default_tuner_type = TUNER_ABSENT, 524 .flag_has_cx25840 = !0, 525 .flag_has_hauppauge_rom = !0, 526 .flag_has_analogtuner = !0, 527 .flag_has_composite = !0, 528 .flag_has_svideo = !0, 529 .flag_fx2_16kb = !0, 530 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, 531 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, 532 .default_std_mask = V4L2_STD_NTSC_M, 533 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, 534 .ir_scheme = PVR2_IR_SCHEME_ZILOG, 535 #ifdef CONFIG_VIDEO_PVRUSB2_DVB 536 .dvb_props = &pvr2_160000_dvb_props, 537 #endif 538 }; 539 540 static const struct pvr2_dvb_props pvr2_160111_dvb_props = { 541 .frontend_attach = pvr2_lgdt3306a_attach, 542 .tuner_attach = pvr2_si2157_attach, 543 }; 544 static const struct pvr2_device_client_desc pvr2_cli_160111[] = { 545 { .module_id = PVR2_CLIENT_ID_CX25840 }, 546 }; 547 static const struct pvr2_device_desc pvr2_device_160111 = { 548 .description = "WinTV HVR-1955 Model 160111", 549 .shortname = "160111", 550 .client_table.lst = pvr2_cli_160111, 551 .client_table.cnt = ARRAY_SIZE(pvr2_cli_160111), 552 .fx2_firmware.lst = pvr2_fw1_names_160xxx, 553 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_160xxx), 554 .default_tuner_type = TUNER_ABSENT, 555 .flag_has_cx25840 = !0, 556 .flag_has_hauppauge_rom = !0, 557 .flag_has_analogtuner = !0, 558 .flag_has_composite = !0, 559 .flag_has_svideo = !0, 560 .flag_fx2_16kb = !0, 561 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, 562 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, 563 .default_std_mask = V4L2_STD_NTSC_M, 564 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, 565 .ir_scheme = PVR2_IR_SCHEME_ZILOG, 566 #ifdef CONFIG_VIDEO_PVRUSB2_DVB 567 .dvb_props = &pvr2_160111_dvb_props, 568 #endif 569 }; 570 571 static int pvr2_si2168_attach(struct pvr2_dvb_adapter *adap) 572 { 573 struct si2168_config si2168_config = {}; 574 struct i2c_adapter *adapter; 575 576 pr_debug("%s()\n", __func__); 577 578 si2168_config.fe = &adap->fe[1]; 579 si2168_config.i2c_adapter = &adapter; 580 si2168_config.ts_mode = SI2168_TS_PARALLEL; /*2, 1-serial, 2-parallel.*/ 581 si2168_config.ts_clock_gapped = 1; /*0-disabled, 1-enabled.*/ 582 si2168_config.ts_clock_inv = 0; /*0-not-invert, 1-invert*/ 583 si2168_config.spectral_inversion = 1; /*0-not-invert, 1-invert*/ 584 585 adap->i2c_client_demod[1] = dvb_module_probe("si2168", NULL, 586 &adap->channel.hdw->i2c_adap, 587 0x64, &si2168_config); 588 589 if (!adap->i2c_client_demod[1]) 590 return -ENODEV; 591 592 return 0; 593 } 594 595 static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap) 596 { 597 struct lgdt3306a_config lgdt3306a_config; 598 struct i2c_adapter *adapter; 599 600 pr_debug("%s()\n", __func__); 601 602 /* attach demod */ 603 lgdt3306a_config.fe = &adap->fe[0]; 604 lgdt3306a_config.i2c_adapter = &adapter; 605 lgdt3306a_config.deny_i2c_rptr = 1; 606 lgdt3306a_config.spectral_inversion = 1; 607 lgdt3306a_config.qam_if_khz = 4000; 608 lgdt3306a_config.vsb_if_khz = 3250; 609 lgdt3306a_config.mpeg_mode = LGDT3306A_MPEG_PARALLEL; 610 lgdt3306a_config.tpclk_edge = LGDT3306A_TPCLK_FALLING_EDGE; 611 lgdt3306a_config.tpvalid_polarity = LGDT3306A_TP_VALID_LOW; 612 lgdt3306a_config.xtalMHz = 25, /* demod clock MHz; 24/25 supported */ 613 614 adap->i2c_client_demod[0] = dvb_module_probe("lgdt3306a", NULL, 615 &adap->channel.hdw->i2c_adap, 616 0x59, &lgdt3306a_config); 617 618 if (!adap->i2c_client_demod[0]) 619 return -ENODEV; 620 621 return 0; 622 } 623 624 static int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap) 625 { 626 pr_debug("%s()\n", __func__); 627 > 628 if (pvr2_lgdt3306a_attach(adap) != 0) 629 return -ENODEV; 630 631 if (pvr2_si2168_attach(adap) != 0) { 632 dvb_module_release(adap->i2c_client_demod[0]); 633 return -ENODEV; 634 } 635 636 return 0; 637 } 638 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation