* [-mm PATCH] v4l: hybrid dvb: fix warnings with -Wundef
@ 2005-07-24 0:00 Michael Krufky
2005-07-24 0:03 ` [-mm PATCH] v4l: hybrid dvb: move #defines to Makefile Michael Krufky
0 siblings, 1 reply; 3+ messages in thread
From: Michael Krufky @ 2005-07-24 0:00 UTC (permalink / raw)
To: Andrew Morton; +Cc: LKML, Linux and Kernel Video, Mauro Carvalho Chehab, mike
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: v4l-dvb-01-fix-warnings-with-Wundef.patch --]
[-- Type: text/plain, Size: 4639 bytes --]
This patch adds a missing #ifdef to saa7134-dvb.c
(thanks to Mauro Carvalho Chehab)
and changes #if to #ifdef in both files.
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
linux/drivers/media/video/cx88/cx88-dvb.c | 24 ++++++++--------
linux/drivers/media/video/saa7134/saa7134-dvb.c | 15 +++++-----
2 files changed, 20 insertions(+), 19 deletions(-)
diff -u linux-2.6.13/drivers/media/video/cx88/cx88-dvb.c linux/drivers/media/video/cx88/cx88-dvb.c
--- linux-2.6.13/drivers/media/video/cx88/cx88-dvb.c 2005-07-23 18:54:34.000000000 +0000
+++ linux/drivers/media/video/cx88/cx88-dvb.c 2005-07-23 19:06:49.000000000 +0000
@@ -38,17 +38,17 @@
#include "cx88.h"
#include "dvb-pll.h"
-#if CONFIG_DVB_MT352
+#ifdef CONFIG_DVB_MT352
# include "mt352.h"
# include "mt352_priv.h"
#endif
-#if CONFIG_DVB_CX22702
+#ifdef CONFIG_DVB_CX22702
# include "cx22702.h"
#endif
-#if CONFIG_DVB_OR51132
+#ifdef CONFIG_DVB_OR51132
# include "or51132.h"
#endif
-#if CONFIG_DVB_LGDT3302
+#ifdef CONFIG_DVB_LGDT3302
# include "lgdt3302.h"
#endif
@@ -107,7 +107,7 @@
/* ------------------------------------------------------------------ */
-#if CONFIG_DVB_MT352
+#ifdef CONFIG_DVB_MT352
static int dvico_fusionhdtv_demod_init(struct dvb_frontend* fe)
{
static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x39 };
@@ -177,7 +177,7 @@
};
#endif
-#if CONFIG_DVB_CX22702
+#ifdef CONFIG_DVB_CX22702
static struct cx22702_config connexant_refboard_config = {
.demod_address = 0x43,
.pll_address = 0x60,
@@ -191,7 +191,7 @@
};
#endif
-#if CONFIG_DVB_OR51132
+#ifdef CONFIG_DVB_OR51132
static int or51132_set_ts_param(struct dvb_frontend* fe,
int is_punctured)
{
@@ -208,7 +208,7 @@
};
#endif
-#if CONFIG_DVB_LGDT3302
+#ifdef CONFIG_DVB_LGDT3302
static int lgdt3302_pll_set(struct dvb_frontend* fe,
struct dvb_frontend_parameters* params,
u8* pllbuf)
@@ -259,7 +259,7 @@
/* init frontend */
switch (dev->core->board) {
-#if CONFIG_DVB_CX22702
+#ifdef CONFIG_DVB_CX22702
case CX88_BOARD_HAUPPAUGE_DVB_T1:
dev->dvb.frontend = cx22702_attach(&hauppauge_novat_config,
&dev->core->i2c_adap);
@@ -270,7 +270,7 @@
&dev->core->i2c_adap);
break;
#endif
-#if CONFIG_DVB_MT352
+#ifdef CONFIG_DVB_MT352
case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
dev->core->pll_addr = 0x61;
dev->core->pll_desc = &dvb_pll_lg_z201;
@@ -292,13 +292,13 @@
&dev->core->i2c_adap);
break;
#endif
-#if CONFIG_DVB_OR51132
+#ifdef CONFIG_DVB_OR51132
case CX88_BOARD_PCHDTV_HD3000:
dev->dvb.frontend = or51132_attach(&pchdtv_hd3000,
&dev->core->i2c_adap);
break;
#endif
-#if CONFIG_DVB_LGDT3302
+#ifdef CONFIG_DVB_LGDT3302
case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q:
dev->ts_gen_cntrl = 0x08;
{
diff -u linux-2.6.13/drivers/media/video/saa7134/saa7134-dvb.c linux/drivers/media/video/saa7134/saa7134-dvb.c
--- linux-2.6.13/drivers/media/video/saa7134/saa7134-dvb.c 2005-07-23 18:39:40.000000000 +0000
+++ linux/drivers/media/video/saa7134/saa7134-dvb.c 2005-07-23 19:06:49.000000000 +0000
@@ -36,11 +36,11 @@
#include "saa7134-reg.h"
#include "saa7134.h"
-#if CONFIG_DVB_MT352
+#ifdef CONFIG_DVB_MT352
# include "mt352.h"
# include "mt352_priv.h" /* FIXME */
#endif
-#if CONFIG_DVB_TDA1004X
+#ifdef CONFIG_DVB_TDA1004X
# include "tda1004x.h"
#endif
@@ -54,7 +54,7 @@
/* ------------------------------------------------------------------ */
-#if CONFIG_DVB_MT352
+#ifdef CONFIG_DVB_MT352
static int pinnacle_antenna_pwr(struct saa7134_dev *dev, int on)
{
u32 ok;
@@ -153,7 +153,7 @@
/* ------------------------------------------------------------------ */
-#if CONFIG_DVB_TDA1004X
+#ifdef CONFIG_DVB_TDA1004X
static int philips_tu1216_pll_init(struct dvb_frontend *fe)
{
struct saa7134_dev *dev = fe->dvb->priv;
@@ -385,7 +385,7 @@
return 0;
}
-
+#ifdef CONFIG_DVB_TDA1004X
static struct tda1004x_config medion_cardbus = {
.demod_address = 0x08,
.invert = 1,
@@ -398,6 +398,7 @@
.pll_sleep = philips_fmd1216_analog,
.request_firmware = NULL,
};
+#endif
/* ------------------------------------------------------------------ */
@@ -547,14 +548,14 @@
dev);
switch (dev->board) {
-#if CONFIG_DVB_MT352
+#ifdef CONFIG_DVB_MT352
case SAA7134_BOARD_PINNACLE_300I_DVBT_PAL:
printk("%s: pinnacle 300i dvb setup\n",dev->name);
dev->dvb.frontend = mt352_attach(&pinnacle_300i,
&dev->i2c_adap);
break;
#endif
-#if CONFIG_DVB_TDA1004X
+#ifdef CONFIG_DVB_TDA1004X
case SAA7134_BOARD_MD7134:
dev->dvb.frontend = tda10046_attach(&medion_cardbus,
&dev->i2c_adap);
^ permalink raw reply [flat|nested] 3+ messages in thread
* [-mm PATCH] v4l: hybrid dvb: move #defines to Makefile
2005-07-24 0:00 [-mm PATCH] v4l: hybrid dvb: fix warnings with -Wundef Michael Krufky
@ 2005-07-24 0:03 ` Michael Krufky
2005-07-24 23:33 ` [-mm PATCH] v4l: hybrid dvb: rename CFLAGS from CONFIG_DVB_xxxx back to original HAVE_xxxx Michael Krufky
0 siblings, 1 reply; 3+ messages in thread
From: Michael Krufky @ 2005-07-24 0:03 UTC (permalink / raw)
To: Andrew Morton; +Cc: LKML, Linux and Kernel Video, Mauro Carvalho Chehab
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: v4l-dvb-02-move-defines-to-makefile.patch --]
[-- Type: text/plain, Size: 3378 bytes --]
This patch moves #define from cx88-dvb.c and saa7134-dvb.c into Makefile
as CFLAGS, allowing code compatability with video4linux cvs.
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
linux/drivers/media/video/cx88/Makefile | 12 ++++++++++++
linux/drivers/media/video/cx88/cx88-dvb.c | 7 ++-----
linux/drivers/media/video/saa7134/Makefile | 6 ++++++
linux/drivers/media/video/saa7134/saa7134-dvb.c | 5 ++---
4 files changed, 22 insertions(+), 8 deletions(-)
diff -u linux-2.6.13/drivers/media/video/cx88/cx88-dvb.c linux/drivers/media/video/cx88/cx88-dvb.c
--- linux-2.6.13/drivers/media/video/cx88/cx88-dvb.c 2005-07-23 19:19:52.000000000 +0000
+++ linux/drivers/media/video/cx88/cx88-dvb.c 2005-07-23 19:42:45.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-dvb.c,v 1.49 2005/07/20 05:38:09 mkrufky Exp $
+ * $Id: cx88-dvb.c,v 1.50 2005/07/23 10:08:00 mkrufky Exp $
*
* device driver for Conexant 2388x based TV cards
* MPEG Transport Stream (DVB) routines
@@ -29,11 +29,8 @@
#include <linux/kthread.h>
#include <linux/file.h>
#include <linux/suspend.h>
+#include <linux/config.h>
-#define CONFIG_DVB_MT352 1
-#define CONFIG_DVB_CX22702 1
-#define CONFIG_DVB_OR51132 1
-#define CONFIG_DVB_LGDT3302 1
#include "cx88.h"
#include "dvb-pll.h"
diff -u linux-2.6.13/drivers/media/video/saa7134/saa7134-dvb.c linux/drivers/media/video/saa7134/saa7134-dvb.c
--- linux-2.6.13/drivers/media/video/saa7134/saa7134-dvb.c 2005-07-23 19:19:52.000000000 +0000
+++ linux/drivers/media/video/saa7134/saa7134-dvb.c 2005-07-23 19:42:45.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-dvb.c,v 1.18 2005/07/04 16:05:50 mkrufky Exp $
+ * $Id: saa7134-dvb.c,v 1.22 2005/07/23 10:08:00 mkrufky Exp $
*
* (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
@@ -29,9 +29,8 @@
#include <linux/delay.h>
#include <linux/kthread.h>
#include <linux/suspend.h>
+#include <linux/config.h>
-#define CONFIG_DVB_MT352 1
-#define CONFIG_DVB_TDA1004X 1
#include "saa7134-reg.h"
#include "saa7134.h"
diff -u linux-2.6.13/drivers/media/video/cx88/Makefile linux/drivers/media/video/cx88/Makefile
--- linux-2.6.13/drivers/media/video/cx88/Makefile 2005-06-17 19:48:29.000000000 +0000
+++ linux/drivers/media/video/cx88/Makefile 2005-07-23 19:42:45.000000000 +0000
@@ -9,3 +9,15 @@
EXTRA_CFLAGS += -I$(src)/..
EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core
EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends
+ifneq ($(CONFIG_DVB_CX22702),n)
+ EXTRA_CFLAGS += -DCONFIG_DVB_CX22702=1
+endif
+ifneq ($(CONFIG_DVB_OR51132),n)
+ EXTRA_CFLAGS += -DCONFIG_DVB_OR51132=1
+endif
+ifneq ($(CONFIG_DVB_LGDT3302),n)
+ EXTRA_CFLAGS += -DCONFIG_DVB_LGDT3302=1
+endif
+ifneq ($(CONFIG_DVB_MT352),n)
+ EXTRA_CFLAGS += -DCONFIG_DVB_MT352=1
+endif
diff -u linux-2.6.13/drivers/media/video/saa7134/Makefile linux/drivers/media/video/saa7134/Makefile
--- linux-2.6.13/drivers/media/video/saa7134/Makefile 2005-06-17 19:48:29.000000000 +0000
+++ linux/drivers/media/video/saa7134/Makefile 2005-07-23 19:42:45.000000000 +0000
@@ -9,3 +9,9 @@
EXTRA_CFLAGS += -I$(src)/..
EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core
EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends
+ifneq ($(CONFIG_DVB_MT352),n)
+ EXTRA_CFLAGS += -DCONFIG_DVB_MT352=1
+endif
+ifneq ($(CONFIG_DVB_TDA1004X),n)
+ EXTRA_CFLAGS += -DCONFIG_DVB_TDA1004X=1
+endif
^ permalink raw reply [flat|nested] 3+ messages in thread
* [-mm PATCH] v4l: hybrid dvb: rename CFLAGS from CONFIG_DVB_xxxx back to original HAVE_xxxx
2005-07-24 0:03 ` [-mm PATCH] v4l: hybrid dvb: move #defines to Makefile Michael Krufky
@ 2005-07-24 23:33 ` Michael Krufky
0 siblings, 0 replies; 3+ messages in thread
From: Michael Krufky @ 2005-07-24 23:33 UTC (permalink / raw)
To: Andrew Morton; +Cc: LKML, Linux and Kernel Video, Mauro Carvalho Chehab, sam
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: v4l-dvb-03-rename-cflags-config-dvb-to-have.patch --]
[-- Type: text/plain, Size: 6521 bytes --]
The #define CONFIG_DVB_* are actually CFLAGS set by Makefile.
CONFIG_* namespace is reserved for Kconfig. This renames them back to HAVE_*
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
linux/drivers/media/video/cx88/Makefile | 8 ++--
linux/drivers/media/video/cx88/cx88-dvb.c | 26 ++++++++--------
linux/drivers/media/video/saa7134/Makefile | 4 +-
linux/drivers/media/video/saa7134/saa7134-dvb.c | 16 ++++-----
4 files changed, 27 insertions(+), 27 deletions(-)
diff -u linux-2.6.13/drivers/media/video/cx88/cx88-dvb.c linux/drivers/media/video/cx88/cx88-dvb.c
--- linux-2.6.13/drivers/media/video/cx88/cx88-dvb.c 2005-07-24 17:59:15.000000000 +0000
+++ linux/drivers/media/video/cx88/cx88-dvb.c 2005-07-24 18:21:52.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-dvb.c,v 1.51 2005/07/24 19:09:28 mkrufky Exp $
+ * $Id: cx88-dvb.c,v 1.52 2005/07/24 22:12:47 mkrufky Exp $
*
* device driver for Conexant 2388x based TV cards
* MPEG Transport Stream (DVB) routines
@@ -35,17 +35,17 @@
#include "cx88.h"
#include "dvb-pll.h"
-#ifdef CONFIG_DVB_MT352
+#ifdef HAVE_MT352
# include "mt352.h"
# include "mt352_priv.h"
#endif
-#ifdef CONFIG_DVB_CX22702
+#ifdef HAVE_CX22702
# include "cx22702.h"
#endif
-#ifdef CONFIG_DVB_OR51132
+#ifdef HAVE_OR51132
# include "or51132.h"
#endif
-#ifdef CONFIG_DVB_LGDT3302
+#ifdef HAVE_LGDT3302
# include "lgdt3302.h"
#endif
@@ -104,7 +104,7 @@
/* ------------------------------------------------------------------ */
-#ifdef CONFIG_DVB_MT352
+#ifdef HAVE_MT352
static int dvico_fusionhdtv_demod_init(struct dvb_frontend* fe)
{
static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x39 };
@@ -174,7 +174,7 @@
};
#endif
-#ifdef CONFIG_DVB_CX22702
+#ifdef HAVE_CX22702
static struct cx22702_config connexant_refboard_config = {
.demod_address = 0x43,
.output_mode = CX22702_SERIAL_OUTPUT,
@@ -190,7 +190,7 @@
};
#endif
-#ifdef CONFIG_DVB_OR51132
+#ifdef HAVE_OR51132
static int or51132_set_ts_param(struct dvb_frontend* fe,
int is_punctured)
{
@@ -207,7 +207,7 @@
};
#endif
-#ifdef CONFIG_DVB_LGDT3302
+#ifdef HAVE_LGDT3302
static int lgdt3302_pll_set(struct dvb_frontend* fe,
struct dvb_frontend_parameters* params,
u8* pllbuf)
@@ -258,7 +258,7 @@
/* init frontend */
switch (dev->core->board) {
-#ifdef CONFIG_DVB_CX22702
+#ifdef HAVE_CX22702
case CX88_BOARD_HAUPPAUGE_DVB_T1:
dev->dvb.frontend = cx22702_attach(&hauppauge_novat_config,
&dev->core->i2c_adap);
@@ -269,7 +269,7 @@
&dev->core->i2c_adap);
break;
#endif
-#ifdef CONFIG_DVB_MT352
+#ifdef HAVE_MT352
case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
dev->core->pll_addr = 0x61;
dev->core->pll_desc = &dvb_pll_lg_z201;
@@ -291,13 +291,13 @@
&dev->core->i2c_adap);
break;
#endif
-#ifdef CONFIG_DVB_OR51132
+#ifdef HAVE_OR51132
case CX88_BOARD_PCHDTV_HD3000:
dev->dvb.frontend = or51132_attach(&pchdtv_hd3000,
&dev->core->i2c_adap);
break;
#endif
-#ifdef CONFIG_DVB_LGDT3302
+#ifdef HAVE_LGDT3302
case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q:
dev->ts_gen_cntrl = 0x08;
{
diff -u linux-2.6.13/drivers/media/video/saa7134/saa7134-dvb.c linux/drivers/media/video/saa7134/saa7134-dvb.c
--- linux-2.6.13/drivers/media/video/saa7134/saa7134-dvb.c 2005-07-24 17:56:27.000000000 +0000
+++ linux/drivers/media/video/saa7134/saa7134-dvb.c 2005-07-24 18:21:52.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-dvb.c,v 1.22 2005/07/23 10:08:00 mkrufky Exp $
+ * $Id: saa7134-dvb.c,v 1.23 2005/07/24 22:12:47 mkrufky Exp $
*
* (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
@@ -35,11 +35,11 @@
#include "saa7134-reg.h"
#include "saa7134.h"
-#ifdef CONFIG_DVB_MT352
+#ifdef HAVE_MT352
# include "mt352.h"
# include "mt352_priv.h" /* FIXME */
#endif
-#ifdef CONFIG_DVB_TDA1004X
+#ifdef HAVE_TDA1004X
# include "tda1004x.h"
#endif
@@ -53,7 +53,7 @@
/* ------------------------------------------------------------------ */
-#ifdef CONFIG_DVB_MT352
+#ifdef HAVE_MT352
static int pinnacle_antenna_pwr(struct saa7134_dev *dev, int on)
{
u32 ok;
@@ -152,7 +152,7 @@
/* ------------------------------------------------------------------ */
-#ifdef CONFIG_DVB_TDA1004X
+#ifdef HAVE_TDA1004X
static int philips_tu1216_pll_init(struct dvb_frontend *fe)
{
struct saa7134_dev *dev = fe->dvb->priv;
@@ -384,7 +384,7 @@
return 0;
}
-#ifdef CONFIG_DVB_TDA1004X
+#ifdef HAVE_TDA1004X
static struct tda1004x_config medion_cardbus = {
.demod_address = 0x08,
.invert = 1,
@@ -547,14 +547,14 @@
dev);
switch (dev->board) {
-#ifdef CONFIG_DVB_MT352
+#ifdef HAVE_MT352
case SAA7134_BOARD_PINNACLE_300I_DVBT_PAL:
printk("%s: pinnacle 300i dvb setup\n",dev->name);
dev->dvb.frontend = mt352_attach(&pinnacle_300i,
&dev->i2c_adap);
break;
#endif
-#ifdef CONFIG_DVB_TDA1004X
+#ifdef HAVE_TDA1004X
case SAA7134_BOARD_MD7134:
dev->dvb.frontend = tda10046_attach(&medion_cardbus,
&dev->i2c_adap);
diff -u linux-2.6.13/drivers/media/video/cx88/Makefile linux/drivers/media/video/cx88/Makefile
--- linux-2.6.13/drivers/media/video/cx88/Makefile 2005-07-24 17:56:27.000000000 +0000
+++ linux/drivers/media/video/cx88/Makefile 2005-07-24 18:21:52.000000000 +0000
@@ -10,14 +10,14 @@
EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core
EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends
ifneq ($(CONFIG_DVB_CX22702),n)
- EXTRA_CFLAGS += -DCONFIG_DVB_CX22702=1
+ EXTRA_CFLAGS += -DHAVE_CX22702=1
endif
ifneq ($(CONFIG_DVB_OR51132),n)
- EXTRA_CFLAGS += -DCONFIG_DVB_OR51132=1
+ EXTRA_CFLAGS += -DHAVE_OR51132=1
endif
ifneq ($(CONFIG_DVB_LGDT3302),n)
- EXTRA_CFLAGS += -DCONFIG_DVB_LGDT3302=1
+ EXTRA_CFLAGS += -DHAVE_LGDT3302=1
endif
ifneq ($(CONFIG_DVB_MT352),n)
- EXTRA_CFLAGS += -DCONFIG_DVB_MT352=1
+ EXTRA_CFLAGS += -DHAVE_MT352=1
endif
diff -u linux-2.6.13/drivers/media/video/saa7134/Makefile linux/drivers/media/video/saa7134/Makefile
--- linux-2.6.13/drivers/media/video/saa7134/Makefile 2005-07-24 17:56:27.000000000 +0000
+++ linux/drivers/media/video/saa7134/Makefile 2005-07-24 18:21:52.000000000 +0000
@@ -10,8 +10,8 @@
EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core
EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/frontends
ifneq ($(CONFIG_DVB_MT352),n)
- EXTRA_CFLAGS += -DCONFIG_DVB_MT352=1
+ EXTRA_CFLAGS += -DHAVE_MT352=1
endif
ifneq ($(CONFIG_DVB_TDA1004X),n)
- EXTRA_CFLAGS += -DCONFIG_DVB_TDA1004X=1
+ EXTRA_CFLAGS += -DHAVE_TDA1004X=1
endif
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-24 23:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-24 0:00 [-mm PATCH] v4l: hybrid dvb: fix warnings with -Wundef Michael Krufky
2005-07-24 0:03 ` [-mm PATCH] v4l: hybrid dvb: move #defines to Makefile Michael Krufky
2005-07-24 23:33 ` [-mm PATCH] v4l: hybrid dvb: rename CFLAGS from CONFIG_DVB_xxxx back to original HAVE_xxxx Michael Krufky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox