Commit b1912a85 authored by Ingo Molnar's avatar Ingo Molnar Committed by Mauro Carvalho Chehab

media: video: Fix build in saa7164

-tip testing found that the x86 build (64-bit allyesconfig) fails due to:

  LD      vmlinux.o
  drivers/built-in.o:(.bss+0x4b648): multiple definition of `debug'
  arch/x86/built-in.o:(.kprobes.text+0x88): first defined here
  ld: Warning: size of symbol `debug' changed from 90 in
arch/x86/built-in.o to 4 in drivers/built-in.o
 make: *** [vmlinux.o] Error 1

This is because recent saa7164 changes introduced a global symbol
named 'debug'. The x86 platform code already defines a 'debug'
symbol. (which is named in a too generic way as well - but it
can be used nicely to weed out too generic symbols in drivers ;-)

Rename it to saa_debug.

[mchehab@redhat.com: use module_param_named to preserve old name]
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 7fa07729
...@@ -415,7 +415,7 @@ int saa7164_api_enum_subdevs(struct saa7164_dev *dev) ...@@ -415,7 +415,7 @@ int saa7164_api_enum_subdevs(struct saa7164_dev *dev)
goto out; goto out;
} }
if (debug & DBGLVL_API) if (saa_debug & DBGLVL_API)
saa7164_dumphex16(dev, buf, (buflen/16)*16); saa7164_dumphex16(dev, buf, (buflen/16)*16);
saa7164_api_dump_subdevs(dev, buf, buflen); saa7164_api_dump_subdevs(dev, buf, buflen);
...@@ -480,7 +480,7 @@ int saa7164_api_i2c_read(struct saa7164_i2c *bus, u8 addr, u32 reglen, u8 *reg, ...@@ -480,7 +480,7 @@ int saa7164_api_i2c_read(struct saa7164_i2c *bus, u8 addr, u32 reglen, u8 *reg,
dprintk(DBGLVL_API, "%s() len = %d bytes\n", __func__, len); dprintk(DBGLVL_API, "%s() len = %d bytes\n", __func__, len);
if (debug & DBGLVL_I2C) if (saa_debug & DBGLVL_I2C)
saa7164_dumphex16(dev, buf, 2 * 16); saa7164_dumphex16(dev, buf, 2 * 16);
ret = saa7164_cmd_send(bus->dev, unitid, GET_CUR, ret = saa7164_cmd_send(bus->dev, unitid, GET_CUR,
...@@ -488,7 +488,7 @@ int saa7164_api_i2c_read(struct saa7164_i2c *bus, u8 addr, u32 reglen, u8 *reg, ...@@ -488,7 +488,7 @@ int saa7164_api_i2c_read(struct saa7164_i2c *bus, u8 addr, u32 reglen, u8 *reg,
if (ret != SAA_OK) if (ret != SAA_OK)
printk(KERN_ERR "%s() error, ret(2) = 0x%x\n", __func__, ret); printk(KERN_ERR "%s() error, ret(2) = 0x%x\n", __func__, ret);
else { else {
if (debug & DBGLVL_I2C) if (saa_debug & DBGLVL_I2C)
saa7164_dumphex16(dev, buf, sizeof(buf)); saa7164_dumphex16(dev, buf, sizeof(buf));
memcpy(data, (buf + 2 * sizeof(u32) + reglen), datalen); memcpy(data, (buf + 2 * sizeof(u32) + reglen), datalen);
} }
...@@ -548,7 +548,7 @@ int saa7164_api_i2c_write(struct saa7164_i2c *bus, u8 addr, u32 datalen, ...@@ -548,7 +548,7 @@ int saa7164_api_i2c_write(struct saa7164_i2c *bus, u8 addr, u32 datalen,
*((u32 *)(buf + 1 * sizeof(u32))) = datalen - reglen; *((u32 *)(buf + 1 * sizeof(u32))) = datalen - reglen;
memcpy((buf + 2 * sizeof(u32)), data, datalen); memcpy((buf + 2 * sizeof(u32)), data, datalen);
if (debug & DBGLVL_I2C) if (saa_debug & DBGLVL_I2C)
saa7164_dumphex16(dev, buf, sizeof(buf)); saa7164_dumphex16(dev, buf, sizeof(buf));
ret = saa7164_cmd_send(bus->dev, unitid, SET_CUR, ret = saa7164_cmd_send(bus->dev, unitid, SET_CUR,
......
...@@ -250,7 +250,7 @@ int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno) ...@@ -250,7 +250,7 @@ int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno)
unsigned long stamp; unsigned long stamp;
int r; int r;
if (debug >= 4) if (saa_debug >= 4)
saa7164_bus_dump(dev); saa7164_bus_dump(dev);
dprintk(DBGLVL_CMD, "%s(seqno=%d)\n", __func__, seqno); dprintk(DBGLVL_CMD, "%s(seqno=%d)\n", __func__, seqno);
......
...@@ -45,8 +45,8 @@ MODULE_LICENSE("GPL"); ...@@ -45,8 +45,8 @@ MODULE_LICENSE("GPL");
32 bus 32 bus
*/ */
unsigned int debug; unsigned int saa_debug;
module_param(debug, int, 0644); module_param_named(debug, saa_debug, int, 0644);
MODULE_PARM_DESC(debug, "enable debug messages"); MODULE_PARM_DESC(debug, "enable debug messages");
unsigned int waitsecs = 10; unsigned int waitsecs = 10;
...@@ -653,7 +653,7 @@ static int __devinit saa7164_initdev(struct pci_dev *pci_dev, ...@@ -653,7 +653,7 @@ static int __devinit saa7164_initdev(struct pci_dev *pci_dev,
printk(KERN_ERR "%s() Unsupported board detected, " printk(KERN_ERR "%s() Unsupported board detected, "
"registering without firmware\n", __func__); "registering without firmware\n", __func__);
dprintk(1, "%s() parameter debug = %d\n", __func__, debug); dprintk(1, "%s() parameter debug = %d\n", __func__, saa_debug);
dprintk(1, "%s() parameter waitsecs = %d\n", __func__, waitsecs); dprintk(1, "%s() parameter waitsecs = %d\n", __func__, waitsecs);
fail_fw: fail_fw:
......
...@@ -375,9 +375,9 @@ extern int saa7164_buffer_dealloc(struct saa7164_tsport *port, ...@@ -375,9 +375,9 @@ extern int saa7164_buffer_dealloc(struct saa7164_tsport *port,
/* ----------------------------------------------------------- */ /* ----------------------------------------------------------- */
extern unsigned int debug; extern unsigned int saa_debug;
#define dprintk(level, fmt, arg...)\ #define dprintk(level, fmt, arg...)\
do { if (debug & level)\ do { if (saa_debug & level)\
printk(KERN_DEBUG "%s: " fmt, dev->name, ## arg);\ printk(KERN_DEBUG "%s: " fmt, dev->name, ## arg);\
} while (0) } while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment