Commit 66a528c1 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Revert "staging:media: Use dev_dbg() instead of pr_debug()"

This reverts commit b6ea5ef8.

Turns out to have lots of run-time issues in that the structure is not
initialized before it is used in the debugging messages.
Reported-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1b672224
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
* Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -661,7 +663,7 @@ static int go7007_usb_interface_reset(struct go7007 *go) ...@@ -661,7 +663,7 @@ static int go7007_usb_interface_reset(struct go7007 *go)
if (usb->board->flags & GO7007_USB_EZUSB) { if (usb->board->flags & GO7007_USB_EZUSB) {
/* Reset buffer in EZ-USB */ /* Reset buffer in EZ-USB */
dev_dbg(go->dev, "resetting EZ-USB buffers\n"); pr_debug("resetting EZ-USB buffers\n");
if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0 || if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0 ||
go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0) go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0)
return -1; return -1;
...@@ -689,7 +691,7 @@ static int go7007_usb_ezusb_write_interrupt(struct go7007 *go, ...@@ -689,7 +691,7 @@ static int go7007_usb_ezusb_write_interrupt(struct go7007 *go,
u16 status_reg = 0; u16 status_reg = 0;
int timeout = 500; int timeout = 500;
dev_dbg(go->dev, "WriteInterrupt: %04x %04x\n", addr, data); pr_debug("WriteInterrupt: %04x %04x\n", addr, data);
for (i = 0; i < 100; ++i) { for (i = 0; i < 100; ++i) {
r = usb_control_msg(usb->usbdev, r = usb_control_msg(usb->usbdev,
...@@ -734,7 +736,7 @@ static int go7007_usb_onboard_write_interrupt(struct go7007 *go, ...@@ -734,7 +736,7 @@ static int go7007_usb_onboard_write_interrupt(struct go7007 *go,
int r; int r;
int timeout = 500; int timeout = 500;
dev_dbg(go->dev, "WriteInterrupt: %04x %04x\n", addr, data); pr_debug("WriteInterrupt: %04x %04x\n", addr, data);
go->usb_buf[0] = data & 0xff; go->usb_buf[0] = data & 0xff;
go->usb_buf[1] = data >> 8; go->usb_buf[1] = data >> 8;
...@@ -771,7 +773,7 @@ static void go7007_usb_readinterrupt_complete(struct urb *urb) ...@@ -771,7 +773,7 @@ static void go7007_usb_readinterrupt_complete(struct urb *urb)
go->interrupt_available = 1; go->interrupt_available = 1;
go->interrupt_data = __le16_to_cpu(regs[0]); go->interrupt_data = __le16_to_cpu(regs[0]);
go->interrupt_value = __le16_to_cpu(regs[1]); go->interrupt_value = __le16_to_cpu(regs[1]);
dev_dbg(go->dev, "ReadInterrupt: %04x %04x\n", pr_debug("ReadInterrupt: %04x %04x\n",
go->interrupt_value, go->interrupt_data); go->interrupt_value, go->interrupt_data);
} }
...@@ -891,7 +893,7 @@ static int go7007_usb_send_firmware(struct go7007 *go, u8 *data, int len) ...@@ -891,7 +893,7 @@ static int go7007_usb_send_firmware(struct go7007 *go, u8 *data, int len)
int transferred, pipe; int transferred, pipe;
int timeout = 500; int timeout = 500;
dev_dbg(go->dev, "DownloadBuffer sending %d bytes\n", len); pr_debug("DownloadBuffer sending %d bytes\n", len);
if (usb->board->flags & GO7007_USB_EZUSB) if (usb->board->flags & GO7007_USB_EZUSB)
pipe = usb_sndbulkpipe(usb->usbdev, 2); pipe = usb_sndbulkpipe(usb->usbdev, 2);
...@@ -977,7 +979,7 @@ static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter, ...@@ -977,7 +979,7 @@ static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter,
!(msgs[i].flags & I2C_M_RD) && !(msgs[i].flags & I2C_M_RD) &&
(msgs[i + 1].flags & I2C_M_RD)) { (msgs[i + 1].flags & I2C_M_RD)) {
#ifdef GO7007_I2C_DEBUG #ifdef GO7007_I2C_DEBUG
dev_dbg(go->dev, "i2c write/read %d/%d bytes on %02x\n", pr_debug("i2c write/read %d/%d bytes on %02x\n",
msgs[i].len, msgs[i + 1].len, msgs[i].addr); msgs[i].len, msgs[i + 1].len, msgs[i].addr);
#endif #endif
buf[0] = 0x01; buf[0] = 0x01;
...@@ -988,7 +990,7 @@ static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter, ...@@ -988,7 +990,7 @@ static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter,
buf[buf_len++] = msgs[++i].len; buf[buf_len++] = msgs[++i].len;
} else if (msgs[i].flags & I2C_M_RD) { } else if (msgs[i].flags & I2C_M_RD) {
#ifdef GO7007_I2C_DEBUG #ifdef GO7007_I2C_DEBUG
dev_dbg(go->dev, "i2c read %d bytes on %02x\n", pr_debug("i2c read %d bytes on %02x\n",
msgs[i].len, msgs[i].addr); msgs[i].len, msgs[i].addr);
#endif #endif
buf[0] = 0x01; buf[0] = 0x01;
...@@ -998,7 +1000,7 @@ static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter, ...@@ -998,7 +1000,7 @@ static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter,
buf_len = 4; buf_len = 4;
} else { } else {
#ifdef GO7007_I2C_DEBUG #ifdef GO7007_I2C_DEBUG
dev_dbg(go->dev, "i2c write %d bytes on %02x\n", pr_debug("i2c write %d bytes on %02x\n",
msgs[i].len, msgs[i].addr); msgs[i].len, msgs[i].addr);
#endif #endif
buf[0] = 0x00; buf[0] = 0x00;
...@@ -1057,7 +1059,7 @@ static int go7007_usb_probe(struct usb_interface *intf, ...@@ -1057,7 +1059,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
char *name; char *name;
int video_pipe, i, v_urb_len; int video_pipe, i, v_urb_len;
dev_dbg(go->dev, "probing new GO7007 USB board\n"); pr_debug("probing new GO7007 USB board\n");
switch (id->driver_info) { switch (id->driver_info) {
case GO7007_BOARDID_MATRIX_II: case GO7007_BOARDID_MATRIX_II:
...@@ -1247,7 +1249,7 @@ static int go7007_usb_probe(struct usb_interface *intf, ...@@ -1247,7 +1249,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
sizeof(go->name)); sizeof(go->name));
break; break;
default: default:
dev_dbg(go->dev, "unable to detect tuner type!\n"); pr_debug("unable to detect tuner type!\n");
break; break;
} }
/* Configure tuner mode selection inputs connected /* Configure tuner mode selection inputs connected
......
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