aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-01-30 21:26:01 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-21 10:35:11 -0500
commit05ad390724d1f307111a322325df83282a1479e6 (patch)
tree8b8dc80c42e3139ae8aa308f80633b92079835f5
parent6827709a6148a6e8530d90027b4f31aa0aaa5ae5 (diff)
V4L/DVB (5166): Remove obsolete alias defines of CONFIG_* settings
The out of tree v4l-dvb build system didn't always override the kernel's configuration settings with v4l-dvb's settings correctly. To work around this, makefiles would define some new macro based on the setting of a config variable. e.g. the pwc Makefile would define CONFIG_PWC_DEBUG if CONFIG_USB_PWC_DEBUG (which is defined via Kconfig) was set. The v4l-dvb build system should now always override correctly, and this is no longer necessary. This patch gets ride of these extra defines and just uses the CONFIG_* settings directly. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/Makefile1
-rw-r--r--drivers/media/video/cx88/Makefile5
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c10
-rw-r--r--drivers/media/video/cx88/cx88-i2c.c2
-rw-r--r--drivers/media/video/cx88/cx88.h6
-rw-r--r--drivers/media/video/pwc/Makefile8
-rw-r--r--drivers/media/video/pwc/pwc-if.c8
-rw-r--r--drivers/media/video/pwc/pwc-v4l.c2
-rw-r--r--drivers/media/video/pwc/pwc.h9
-rw-r--r--drivers/media/video/saa7134/Makefile4
-rw-r--r--drivers/media/video/saa7134/saa7134.h4
11 files changed, 24 insertions, 35 deletions
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index 9b1f3f06bb7c..44ccaed40b49 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -113,4 +113,3 @@ obj-$(CONFIG_USB_QUICKCAM_MESSENGER) += usbvideo/
113obj-$(CONFIG_VIDEO_VIVI) += vivi.o 113obj-$(CONFIG_VIDEO_VIVI) += vivi.o
114 114
115EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core 115EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
116extra-cflags-$(CONFIG_VIDEO_V4L1_COMPAT) += -DCONFIG_VIDEO_V4L1_COMPAT
diff --git a/drivers/media/video/cx88/Makefile b/drivers/media/video/cx88/Makefile
index 639c3b659d0e..532cee35eb3c 100644
--- a/drivers/media/video/cx88/Makefile
+++ b/drivers/media/video/cx88/Makefile
@@ -12,8 +12,3 @@ obj-$(CONFIG_VIDEO_CX88_VP3054) += cx88-vp3054-i2c.o
12EXTRA_CFLAGS += -Idrivers/media/video 12EXTRA_CFLAGS += -Idrivers/media/video
13EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core 13EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
14EXTRA_CFLAGS += -Idrivers/media/dvb/frontends 14EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
15
16extra-cflags-$(CONFIG_VIDEO_BUF_DVB) += -DHAVE_VIDEO_BUF_DVB=1
17extra-cflags-$(CONFIG_VIDEO_CX88_VP3054)+= -DHAVE_VP3054_I2C=1
18
19EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index 8b203354fccd..4f5560285770 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -35,7 +35,7 @@
35 35
36#include "mt352.h" 36#include "mt352.h"
37#include "mt352_priv.h" 37#include "mt352_priv.h"
38#ifdef HAVE_VP3054_I2C 38#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE)
39# include "cx88-vp3054-i2c.h" 39# include "cx88-vp3054-i2c.h"
40#endif 40#endif
41#include "zl10353.h" 41#include "zl10353.h"
@@ -200,7 +200,7 @@ static struct mt352_config dvico_fusionhdtv_dual = {
200 .demod_init = dvico_dual_demod_init, 200 .demod_init = dvico_dual_demod_init,
201}; 201};
202 202
203#ifdef HAVE_VP3054_I2C 203#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE)
204static int dntv_live_dvbt_pro_demod_init(struct dvb_frontend* fe) 204static int dntv_live_dvbt_pro_demod_init(struct dvb_frontend* fe)
205{ 205{
206 static u8 clock_config [] = { 0x89, 0x38, 0x38 }; 206 static u8 clock_config [] = { 0x89, 0x38, 0x38 };
@@ -543,7 +543,7 @@ static int dvb_register(struct cx8802_dev *dev)
543 } 543 }
544 break; 544 break;
545 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: 545 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
546#ifdef HAVE_VP3054_I2C 546#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE)
547 dev->core->pll_addr = 0x61; 547 dev->core->pll_addr = 0x61;
548 dev->core->pll_desc = &dvb_pll_fmd1216me; 548 dev->core->pll_desc = &dvb_pll_fmd1216me;
549 dev->dvb.frontend = dvb_attach(mt352_attach, &dntv_live_dvbt_pro_config, 549 dev->dvb.frontend = dvb_attach(mt352_attach, &dntv_live_dvbt_pro_config,
@@ -793,7 +793,7 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv)
793 if (!(cx88_boards[core->board].mpeg & CX88_MPEG_DVB)) 793 if (!(cx88_boards[core->board].mpeg & CX88_MPEG_DVB))
794 goto fail_core; 794 goto fail_core;
795 795
796#ifdef HAVE_VP3054_I2C 796#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE)
797 err = vp3054_i2c_probe(dev); 797 err = vp3054_i2c_probe(dev);
798 if (0 != err) 798 if (0 != err)
799 goto fail_core; 799 goto fail_core;
@@ -822,7 +822,7 @@ static int cx8802_dvb_remove(struct cx8802_driver *drv)
822 /* dvb */ 822 /* dvb */
823 videobuf_dvb_unregister(&dev->dvb); 823 videobuf_dvb_unregister(&dev->dvb);
824 824
825#ifdef HAVE_VP3054_I2C 825#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE)
826 vp3054_i2c_remove(dev); 826 vp3054_i2c_remove(dev);
827#endif 827#endif
828 828
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c
index 88af23a93870..9830d5c43921 100644
--- a/drivers/media/video/cx88/cx88-i2c.c
+++ b/drivers/media/video/cx88/cx88-i2c.c
@@ -145,6 +145,7 @@ void cx88_call_i2c_clients(struct cx88_core *core, unsigned int cmd, void *arg)
145 if (0 != core->i2c_rc) 145 if (0 != core->i2c_rc)
146 return; 146 return;
147 147
148#if defined(CONFIG_VIDEO_BUF_DVB) || defined(CONFIG_VIDEO_BUF_DVB_MODULE)
148 if ( (core->dvbdev) && (core->dvbdev->dvb.frontend) ) { 149 if ( (core->dvbdev) && (core->dvbdev->dvb.frontend) ) {
149 if (core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl) 150 if (core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl)
150 core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl(core->dvbdev->dvb.frontend, 1); 151 core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl(core->dvbdev->dvb.frontend, 1);
@@ -154,6 +155,7 @@ void cx88_call_i2c_clients(struct cx88_core *core, unsigned int cmd, void *arg)
154 if (core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl) 155 if (core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl)
155 core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl(core->dvbdev->dvb.frontend, 0); 156 core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl(core->dvbdev->dvb.frontend, 0);
156 } else 157 } else
158#endif
157 i2c_clients_command(&core->i2c_adap, cmd, arg); 159 i2c_clients_command(&core->i2c_adap, cmd, arg);
158} 160}
159 161
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
index 0cd1b57bcd12..d2ecfba9bb4d 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -31,7 +31,9 @@
31#include <media/video-buf.h> 31#include <media/video-buf.h>
32#include <media/cx2341x.h> 32#include <media/cx2341x.h>
33#include <media/audiochip.h> 33#include <media/audiochip.h>
34#if defined(CONFIG_VIDEO_BUF_DVB) || defined(CONFIG_VIDEO_BUF_DVB_MODULE)
34#include <media/video-buf-dvb.h> 35#include <media/video-buf-dvb.h>
36#endif
35 37
36#include "btcx-risc.h" 38#include "btcx-risc.h"
37#include "cx88-reg.h" 39#include "cx88-reg.h"
@@ -313,9 +315,11 @@ struct cx88_core {
313 unsigned int tuner_formats; 315 unsigned int tuner_formats;
314 316
315 /* config info -- dvb */ 317 /* config info -- dvb */
318#if defined(CONFIG_VIDEO_BUF_DVB) || defined(CONFIG_VIDEO_BUF_DVB_MODULE)
316 struct dvb_pll_desc *pll_desc; 319 struct dvb_pll_desc *pll_desc;
317 unsigned int pll_addr; 320 unsigned int pll_addr;
318 int (*prev_set_voltage)(struct dvb_frontend* fe, fe_sec_voltage_t voltage); 321 int (*prev_set_voltage)(struct dvb_frontend* fe, fe_sec_voltage_t voltage);
322#endif
319 323
320 /* state info */ 324 /* state info */
321 struct task_struct *kthread; 325 struct task_struct *kthread;
@@ -460,12 +464,14 @@ struct cx8802_dev {
460 int width; 464 int width;
461 int height; 465 int height;
462 466
467#if defined(CONFIG_VIDEO_BUF_DVB) || defined(CONFIG_VIDEO_BUF_DVB_MODULE)
463 /* for dvb only */ 468 /* for dvb only */
464 struct videobuf_dvb dvb; 469 struct videobuf_dvb dvb;
465 void* fe_handle; 470 void* fe_handle;
466 int (*fe_release)(void *handle); 471 int (*fe_release)(void *handle);
467 472
468 void *card_priv; 473 void *card_priv;
474#endif
469 /* for switching modulation types */ 475 /* for switching modulation types */
470 unsigned char ts_gen_cntrl; 476 unsigned char ts_gen_cntrl;
471 477
diff --git a/drivers/media/video/pwc/Makefile b/drivers/media/video/pwc/Makefile
index 9db2260d10cc..f5c8ec261e87 100644
--- a/drivers/media/video/pwc/Makefile
+++ b/drivers/media/video/pwc/Makefile
@@ -2,11 +2,3 @@ pwc-objs := pwc-if.o pwc-misc.o pwc-ctrl.o pwc-v4l.o pwc-uncompress.o
2pwc-objs += pwc-dec1.o pwc-dec23.o pwc-kiara.o pwc-timon.o 2pwc-objs += pwc-dec1.o pwc-dec23.o pwc-kiara.o pwc-timon.o
3 3
4obj-$(CONFIG_USB_PWC) += pwc.o 4obj-$(CONFIG_USB_PWC) += pwc.o
5
6ifeq ($(CONFIG_USB_PWC_DEBUG),y)
7EXTRA_CFLAGS += -DCONFIG_PWC_DEBUG=1
8else
9EXTRA_CFLAGS += -DCONFIG_PWC_DEBUG=0
10endif
11
12
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 9825fd348108..27ed76986ca2 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -128,7 +128,7 @@ static int default_size = PSZ_QCIF;
128static int default_fps = 10; 128static int default_fps = 10;
129static int default_fbufs = 3; /* Default number of frame buffers */ 129static int default_fbufs = 3; /* Default number of frame buffers */
130 int pwc_mbufs = 2; /* Default number of mmap() buffers */ 130 int pwc_mbufs = 2; /* Default number of mmap() buffers */
131#if CONFIG_PWC_DEBUG 131#ifdef CONFIG_USB_PWC_DEBUG
132 int pwc_trace = PWC_DEBUG_LEVEL; 132 int pwc_trace = PWC_DEBUG_LEVEL;
133#endif 133#endif
134static int power_save = 0; 134static int power_save = 0;
@@ -1051,7 +1051,7 @@ static void pwc_remove_sysfs_files(struct video_device *vdev)
1051 video_device_remove_file(vdev, &class_device_attr_button); 1051 video_device_remove_file(vdev, &class_device_attr_button);
1052} 1052}
1053 1053
1054#if CONFIG_PWC_DEBUG 1054#ifdef CONFIG_USB_PWC_DEBUG
1055static const char *pwc_sensor_type_to_string(unsigned int sensor_type) 1055static const char *pwc_sensor_type_to_string(unsigned int sensor_type)
1056{ 1056{
1057 switch(sensor_type) { 1057 switch(sensor_type) {
@@ -1835,7 +1835,7 @@ module_param(size, charp, 0444);
1835module_param(fps, int, 0444); 1835module_param(fps, int, 0444);
1836module_param(fbufs, int, 0444); 1836module_param(fbufs, int, 0444);
1837module_param(mbufs, int, 0444); 1837module_param(mbufs, int, 0444);
1838#if CONFIG_PWC_DEBUG 1838#ifdef CONFIG_USB_PWC_DEBUG
1839module_param_named(trace, pwc_trace, int, 0644); 1839module_param_named(trace, pwc_trace, int, 0644);
1840#endif 1840#endif
1841module_param(power_save, int, 0444); 1841module_param(power_save, int, 0444);
@@ -1908,7 +1908,7 @@ static int __init usb_pwc_init(void)
1908 default_fbufs = fbufs; 1908 default_fbufs = fbufs;
1909 PWC_DEBUG_MODULE("Number of frame buffers set to %d.\n", default_fbufs); 1909 PWC_DEBUG_MODULE("Number of frame buffers set to %d.\n", default_fbufs);
1910 } 1910 }
1911#if CONFIG_PWC_DEBUG 1911#ifdef CONFIG_USB_PWC_DEBUG
1912 if (pwc_trace >= 0) { 1912 if (pwc_trace >= 0) {
1913 PWC_DEBUG_MODULE("Trace options: 0x%04x\n", pwc_trace); 1913 PWC_DEBUG_MODULE("Trace options: 0x%04x\n", pwc_trace);
1914 } 1914 }
diff --git a/drivers/media/video/pwc/pwc-v4l.c b/drivers/media/video/pwc/pwc-v4l.c
index b7eb3ce3b968..d5e6bc850643 100644
--- a/drivers/media/video/pwc/pwc-v4l.c
+++ b/drivers/media/video/pwc/pwc-v4l.c
@@ -350,7 +350,7 @@ int pwc_video_do_ioctl(struct inode *inode, struct file *file,
350 if (pdev == NULL) 350 if (pdev == NULL)
351 return -EFAULT; 351 return -EFAULT;
352 352
353#if CONFIG_PWC_DEBUG 353#ifdef CONFIG_USB_PWC_DEBUG
354 if (PWC_DEBUG_LEVEL_IOCTL & pwc_trace) 354 if (PWC_DEBUG_LEVEL_IOCTL & pwc_trace)
355 v4l_printk_ioctl(cmd); 355 v4l_printk_ioctl(cmd);
356#endif 356#endif
diff --git a/drivers/media/video/pwc/pwc.h b/drivers/media/video/pwc/pwc.h
index 7e9c4237d1e8..e778a2b8c280 100644
--- a/drivers/media/video/pwc/pwc.h
+++ b/drivers/media/video/pwc/pwc.h
@@ -39,11 +39,6 @@
39#include "pwc-uncompress.h" 39#include "pwc-uncompress.h"
40#include <media/pwc-ioctl.h> 40#include <media/pwc-ioctl.h>
41 41
42/* Turn some debugging options on/off */
43#ifndef CONFIG_PWC_DEBUG
44#define CONFIG_PWC_DEBUG 1
45#endif
46
47/* Version block */ 42/* Version block */
48#define PWC_MAJOR 10 43#define PWC_MAJOR 10
49#define PWC_MINOR 0 44#define PWC_MINOR 0
@@ -76,7 +71,7 @@
76#define PWC_DEBUG_TRACE(fmt, args...) PWC_DEBUG(TRACE, fmt, ##args) 71#define PWC_DEBUG_TRACE(fmt, args...) PWC_DEBUG(TRACE, fmt, ##args)
77 72
78 73
79#if CONFIG_PWC_DEBUG 74#ifdef CONFIG_USB_PWC_DEBUG
80 75
81#define PWC_DEBUG_LEVEL (PWC_DEBUG_LEVEL_MODULE) 76#define PWC_DEBUG_LEVEL (PWC_DEBUG_LEVEL_MODULE)
82 77
@@ -270,7 +265,7 @@ extern "C" {
270#endif 265#endif
271 266
272/* Global variables */ 267/* Global variables */
273#if CONFIG_PWC_DEBUG 268#ifdef CONFIG_USB_PWC_DEBUG
274extern int pwc_trace; 269extern int pwc_trace;
275#endif 270#endif
276extern int pwc_mbufs; 271extern int pwc_mbufs;
diff --git a/drivers/media/video/saa7134/Makefile b/drivers/media/video/saa7134/Makefile
index 89a1565b4256..c85c8a8ec361 100644
--- a/drivers/media/video/saa7134/Makefile
+++ b/drivers/media/video/saa7134/Makefile
@@ -14,7 +14,3 @@ obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o
14EXTRA_CFLAGS += -Idrivers/media/video 14EXTRA_CFLAGS += -Idrivers/media/video
15EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core 15EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
16EXTRA_CFLAGS += -Idrivers/media/dvb/frontends 16EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
17
18extra-cflags-$(CONFIG_VIDEO_BUF_DVB) += -DHAVE_VIDEO_BUF_DVB=1
19
20EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index 181a1d0fb1e9..2ad859bda2e3 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -41,7 +41,9 @@
41#include <sound/driver.h> 41#include <sound/driver.h>
42#include <sound/core.h> 42#include <sound/core.h>
43#include <sound/pcm.h> 43#include <sound/pcm.h>
44#if defined(CONFIG_VIDEO_BUF_DVB) || defined(CONFIG_VIDEO_BUF_DVB_MODULE)
44#include <media/video-buf-dvb.h> 45#include <media/video-buf-dvb.h>
46#endif
45 47
46#ifndef TRUE 48#ifndef TRUE
47# define TRUE (1==1) 49# define TRUE (1==1)
@@ -532,9 +534,11 @@ struct saa7134_dev {
532 struct work_struct empress_workqueue; 534 struct work_struct empress_workqueue;
533 int empress_started; 535 int empress_started;
534 536
537#if defined(CONFIG_VIDEO_BUF_DVB) || defined(CONFIG_VIDEO_BUF_DVB_MODULE)
535 /* SAA7134_MPEG_DVB only */ 538 /* SAA7134_MPEG_DVB only */
536 struct videobuf_dvb dvb; 539 struct videobuf_dvb dvb;
537 int (*original_demod_sleep)(struct dvb_frontend* fe); 540 int (*original_demod_sleep)(struct dvb_frontend* fe);
541#endif
538}; 542};
539 543
540/* ----------------------------------------------------------- */ 544/* ----------------------------------------------------------- */