aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-05-27 11:38:08 -0400
committerTakashi Iwai <tiwai@suse.de>2014-05-27 11:38:08 -0400
commita58bdba749b36069ec372da9c9fd16017b6c0b47 (patch)
tree95c79448427425d1c05712a7c7fb98ed42e41539 /drivers/media/usb
parent00a6d7b6762c27d441e9ac8faff36384bc0fc180 (diff)
parent51fa31d462f32e1ffdf957802dcab1dc20d2f243 (diff)
Merge branch 'topic/firewire' into for-next
This is a merge of big firewire audio stack updates by Takashi Sakamoto.
Diffstat (limited to 'drivers/media/usb')
-rw-r--r--drivers/media/usb/dvb-usb-v2/Makefile1
-rw-r--r--drivers/media/usb/dvb-usb-v2/rtl28xxu.c48
-rw-r--r--drivers/media/usb/gspca/sonixb.c2
3 files changed, 43 insertions, 8 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/Makefile b/drivers/media/usb/dvb-usb-v2/Makefile
index 7407b8338ccf..bc38f03394cd 100644
--- a/drivers/media/usb/dvb-usb-v2/Makefile
+++ b/drivers/media/usb/dvb-usb-v2/Makefile
@@ -41,4 +41,3 @@ ccflags-y += -I$(srctree)/drivers/media/dvb-core
41ccflags-y += -I$(srctree)/drivers/media/dvb-frontends 41ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
42ccflags-y += -I$(srctree)/drivers/media/tuners 42ccflags-y += -I$(srctree)/drivers/media/tuners
43ccflags-y += -I$(srctree)/drivers/media/common 43ccflags-y += -I$(srctree)/drivers/media/common
44ccflags-y += -I$(srctree)/drivers/staging/media/rtl2832u_sdr
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index 61d196e8b3ab..dcbd392e6efc 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -24,7 +24,6 @@
24 24
25#include "rtl2830.h" 25#include "rtl2830.h"
26#include "rtl2832.h" 26#include "rtl2832.h"
27#include "rtl2832_sdr.h"
28 27
29#include "qt1010.h" 28#include "qt1010.h"
30#include "mt2060.h" 29#include "mt2060.h"
@@ -36,6 +35,45 @@
36#include "tua9001.h" 35#include "tua9001.h"
37#include "r820t.h" 36#include "r820t.h"
38 37
38/*
39 * RTL2832_SDR module is in staging. That logic is added in order to avoid any
40 * hard dependency to drivers/staging/ directory as we want compile mainline
41 * driver even whole staging directory is missing.
42 */
43#include <media/v4l2-subdev.h>
44
45#if IS_ENABLED(CONFIG_DVB_RTL2832_SDR)
46struct dvb_frontend *rtl2832_sdr_attach(struct dvb_frontend *fe,
47 struct i2c_adapter *i2c, const struct rtl2832_config *cfg,
48 struct v4l2_subdev *sd);
49#else
50static inline struct dvb_frontend *rtl2832_sdr_attach(struct dvb_frontend *fe,
51 struct i2c_adapter *i2c, const struct rtl2832_config *cfg,
52 struct v4l2_subdev *sd)
53{
54 return NULL;
55}
56#endif
57
58#ifdef CONFIG_MEDIA_ATTACH
59#define dvb_attach_sdr(FUNCTION, ARGS...) ({ \
60 void *__r = NULL; \
61 typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
62 if (__a) { \
63 __r = (void *) __a(ARGS); \
64 if (__r == NULL) \
65 symbol_put(FUNCTION); \
66 } \
67 __r; \
68})
69
70#else
71#define dvb_attach_sdr(FUNCTION, ARGS...) ({ \
72 FUNCTION(ARGS); \
73})
74
75#endif
76
39static int rtl28xxu_disable_rc; 77static int rtl28xxu_disable_rc;
40module_param_named(disable_rc, rtl28xxu_disable_rc, int, 0644); 78module_param_named(disable_rc, rtl28xxu_disable_rc, int, 0644);
41MODULE_PARM_DESC(disable_rc, "disable RTL2832U remote controller"); 79MODULE_PARM_DESC(disable_rc, "disable RTL2832U remote controller");
@@ -908,7 +946,7 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap)
908 adap->fe[0]->ops.tuner_ops.get_rf_strength; 946 adap->fe[0]->ops.tuner_ops.get_rf_strength;
909 947
910 /* attach SDR */ 948 /* attach SDR */
911 dvb_attach(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap, 949 dvb_attach_sdr(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap,
912 &rtl28xxu_rtl2832_fc0012_config, NULL); 950 &rtl28xxu_rtl2832_fc0012_config, NULL);
913 break; 951 break;
914 case TUNER_RTL2832_FC0013: 952 case TUNER_RTL2832_FC0013:
@@ -920,7 +958,7 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap)
920 adap->fe[0]->ops.tuner_ops.get_rf_strength; 958 adap->fe[0]->ops.tuner_ops.get_rf_strength;
921 959
922 /* attach SDR */ 960 /* attach SDR */
923 dvb_attach(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap, 961 dvb_attach_sdr(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap,
924 &rtl28xxu_rtl2832_fc0013_config, NULL); 962 &rtl28xxu_rtl2832_fc0013_config, NULL);
925 break; 963 break;
926 case TUNER_RTL2832_E4000: { 964 case TUNER_RTL2832_E4000: {
@@ -951,7 +989,7 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap)
951 i2c_set_adapdata(i2c_adap_internal, d); 989 i2c_set_adapdata(i2c_adap_internal, d);
952 990
953 /* attach SDR */ 991 /* attach SDR */
954 dvb_attach(rtl2832_sdr_attach, adap->fe[0], 992 dvb_attach_sdr(rtl2832_sdr_attach, adap->fe[0],
955 i2c_adap_internal, 993 i2c_adap_internal,
956 &rtl28xxu_rtl2832_e4000_config, sd); 994 &rtl28xxu_rtl2832_e4000_config, sd);
957 } 995 }
@@ -982,7 +1020,7 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap)
982 adap->fe[0]->ops.tuner_ops.get_rf_strength; 1020 adap->fe[0]->ops.tuner_ops.get_rf_strength;
983 1021
984 /* attach SDR */ 1022 /* attach SDR */
985 dvb_attach(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap, 1023 dvb_attach_sdr(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap,
986 &rtl28xxu_rtl2832_r820t_config, NULL); 1024 &rtl28xxu_rtl2832_r820t_config, NULL);
987 break; 1025 break;
988 case TUNER_RTL2832_R828D: 1026 case TUNER_RTL2832_R828D:
diff --git a/drivers/media/usb/gspca/sonixb.c b/drivers/media/usb/gspca/sonixb.c
index 7277dbd2afcd..ecbcb39feb71 100644
--- a/drivers/media/usb/gspca/sonixb.c
+++ b/drivers/media/usb/gspca/sonixb.c
@@ -1430,10 +1430,8 @@ static const struct usb_device_id device_table[] = {
1430 {USB_DEVICE(0x0c45, 0x600d), SB(PAS106, 101)}, 1430 {USB_DEVICE(0x0c45, 0x600d), SB(PAS106, 101)},
1431 {USB_DEVICE(0x0c45, 0x6011), SB(OV6650, 101)}, 1431 {USB_DEVICE(0x0c45, 0x6011), SB(OV6650, 101)},
1432 {USB_DEVICE(0x0c45, 0x6019), SB(OV7630, 101)}, 1432 {USB_DEVICE(0x0c45, 0x6019), SB(OV7630, 101)},
1433#if !IS_ENABLED(CONFIG_USB_SN9C102)
1434 {USB_DEVICE(0x0c45, 0x6024), SB(TAS5130CXX, 102)}, 1433 {USB_DEVICE(0x0c45, 0x6024), SB(TAS5130CXX, 102)},
1435 {USB_DEVICE(0x0c45, 0x6025), SB(TAS5130CXX, 102)}, 1434 {USB_DEVICE(0x0c45, 0x6025), SB(TAS5130CXX, 102)},
1436#endif
1437 {USB_DEVICE(0x0c45, 0x6027), SB(OV7630, 101)}, /* Genius Eye 310 */ 1435 {USB_DEVICE(0x0c45, 0x6027), SB(OV7630, 101)}, /* Genius Eye 310 */
1438 {USB_DEVICE(0x0c45, 0x6028), SB(PAS202, 102)}, 1436 {USB_DEVICE(0x0c45, 0x6028), SB(PAS202, 102)},
1439 {USB_DEVICE(0x0c45, 0x6029), SB(PAS106, 102)}, 1437 {USB_DEVICE(0x0c45, 0x6029), SB(PAS106, 102)},