diff options
author | Erik Andrén <erik.andren@gmail.com> | 2009-06-22 10:12:29 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-18 23:52:22 -0400 |
commit | be3bdfb6e01f3e72b814758606e89d4829e9e88f (patch) | |
tree | 4f6546a0ff72bf7723d019685152b750785b6229 /drivers/media/video/gspca/stv06xx/stv06xx.c | |
parent | 607cfab6e7bce8049e61795e86f9bbbe07abd514 (diff) |
V4L/DVB (13004): gspca - stv06xx: Harmonize the debug macros when tracing writes and reads
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/stv06xx/stv06xx.c')
-rw-r--r-- | drivers/media/video/gspca/stv06xx/stv06xx.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/video/gspca/stv06xx/stv06xx.c index 7af511b5e9c2..dba6394ae9a1 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx.c | |||
@@ -50,7 +50,6 @@ int stv06xx_write_bridge(struct sd *sd, u16 address, u16 i2c_data) | |||
50 | 0x04, 0x40, address, 0, buf, len, | 50 | 0x04, 0x40, address, 0, buf, len, |
51 | STV06XX_URB_MSG_TIMEOUT); | 51 | STV06XX_URB_MSG_TIMEOUT); |
52 | 52 | ||
53 | |||
54 | PDEBUG(D_CONF, "Written 0x%x to address 0x%x, status: %d", | 53 | PDEBUG(D_CONF, "Written 0x%x to address 0x%x, status: %d", |
55 | i2c_data, address, err); | 54 | i2c_data, address, err); |
56 | 55 | ||
@@ -69,7 +68,7 @@ int stv06xx_read_bridge(struct sd *sd, u16 address, u8 *i2c_data) | |||
69 | 68 | ||
70 | *i2c_data = buf[0]; | 69 | *i2c_data = buf[0]; |
71 | 70 | ||
72 | PDEBUG(D_CONF, "Read 0x%x from address 0x%x, status %d", | 71 | PDEBUG(D_CONF, "Reading 0x%x from address 0x%x, status %d", |
73 | *i2c_data, address, err); | 72 | *i2c_data, address, err); |
74 | 73 | ||
75 | return (err < 0) ? err : 0; | 74 | return (err < 0) ? err : 0; |
@@ -111,14 +110,14 @@ int stv06xx_write_sensor_bytes(struct sd *sd, const u8 *data, u8 len) | |||
111 | struct usb_device *udev = sd->gspca_dev.dev; | 110 | struct usb_device *udev = sd->gspca_dev.dev; |
112 | __u8 *buf = sd->gspca_dev.usb_buf; | 111 | __u8 *buf = sd->gspca_dev.usb_buf; |
113 | 112 | ||
114 | PDEBUG(D_USBO, "I2C: Command buffer contains %d entries", len); | 113 | PDEBUG(D_CONF, "I2C: Command buffer contains %d entries", len); |
115 | for (i = 0; i < len;) { | 114 | for (i = 0; i < len;) { |
116 | /* Build the command buffer */ | 115 | /* Build the command buffer */ |
117 | memset(buf, 0, I2C_BUFFER_LENGTH); | 116 | memset(buf, 0, I2C_BUFFER_LENGTH); |
118 | for (j = 0; j < I2C_MAX_BYTES && i < len; j++, i++) { | 117 | for (j = 0; j < I2C_MAX_BYTES && i < len; j++, i++) { |
119 | buf[j] = data[2*i]; | 118 | buf[j] = data[2*i]; |
120 | buf[0x10 + j] = data[2*i+1]; | 119 | buf[0x10 + j] = data[2*i+1]; |
121 | PDEBUG(D_USBO, "I2C: Writing 0x%02x to reg 0x%02x", | 120 | PDEBUG(D_CONF, "I2C: Writing 0x%02x to reg 0x%02x", |
122 | data[2*i+1], data[2*i]); | 121 | data[2*i+1], data[2*i]); |
123 | } | 122 | } |
124 | buf[0x20] = sd->sensor->i2c_addr; | 123 | buf[0x20] = sd->sensor->i2c_addr; |
@@ -140,7 +139,7 @@ int stv06xx_write_sensor_words(struct sd *sd, const u16 *data, u8 len) | |||
140 | struct usb_device *udev = sd->gspca_dev.dev; | 139 | struct usb_device *udev = sd->gspca_dev.dev; |
141 | __u8 *buf = sd->gspca_dev.usb_buf; | 140 | __u8 *buf = sd->gspca_dev.usb_buf; |
142 | 141 | ||
143 | PDEBUG(D_USBO, "I2C: Command buffer contains %d entries", len); | 142 | PDEBUG(D_CONF, "I2C: Command buffer contains %d entries", len); |
144 | 143 | ||
145 | for (i = 0; i < len;) { | 144 | for (i = 0; i < len;) { |
146 | /* Build the command buffer */ | 145 | /* Build the command buffer */ |
@@ -149,7 +148,7 @@ int stv06xx_write_sensor_words(struct sd *sd, const u16 *data, u8 len) | |||
149 | buf[j] = data[2*i]; | 148 | buf[j] = data[2*i]; |
150 | buf[0x10 + j * 2] = data[2*i+1]; | 149 | buf[0x10 + j * 2] = data[2*i+1]; |
151 | buf[0x10 + j * 2 + 1] = data[2*i+1] >> 8; | 150 | buf[0x10 + j * 2 + 1] = data[2*i+1] >> 8; |
152 | PDEBUG(D_USBO, "I2C: Writing 0x%04x to reg 0x%02x", | 151 | PDEBUG(D_CONF, "I2C: Writing 0x%04x to reg 0x%02x", |
153 | data[2*i+1], data[2*i]); | 152 | data[2*i+1], data[2*i]); |
154 | } | 153 | } |
155 | buf[0x20] = sd->sensor->i2c_addr; | 154 | buf[0x20] = sd->sensor->i2c_addr; |
@@ -189,7 +188,7 @@ int stv06xx_read_sensor(struct sd *sd, const u8 address, u16 *value) | |||
189 | 0x04, 0x40, 0x1400, 0, buf, I2C_BUFFER_LENGTH, | 188 | 0x04, 0x40, 0x1400, 0, buf, I2C_BUFFER_LENGTH, |
190 | STV06XX_URB_MSG_TIMEOUT); | 189 | STV06XX_URB_MSG_TIMEOUT); |
191 | if (err < 0) { | 190 | if (err < 0) { |
192 | PDEBUG(D_ERR, "I2C Read: error writing address: %d", err); | 191 | PDEBUG(D_ERR, "I2C: Read error writing address: %d", err); |
193 | return err; | 192 | return err; |
194 | } | 193 | } |
195 | 194 | ||
@@ -201,7 +200,7 @@ int stv06xx_read_sensor(struct sd *sd, const u8 address, u16 *value) | |||
201 | else | 200 | else |
202 | *value = buf[0]; | 201 | *value = buf[0]; |
203 | 202 | ||
204 | PDEBUG(D_USBO, "I2C: Read 0x%x from address 0x%x, status: %d", | 203 | PDEBUG(D_CONF, "I2C: Read 0x%x from address 0x%x, status: %d", |
205 | *value, address, err); | 204 | *value, address, err); |
206 | 205 | ||
207 | return (err < 0) ? err : 0; | 206 | return (err < 0) ? err : 0; |