diff options
Diffstat (limited to 'drivers/media/video/gspca/stv06xx/stv06xx.c')
-rw-r--r-- | drivers/media/video/gspca/stv06xx/stv06xx.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/video/gspca/stv06xx/stv06xx.c index abf1658fa33e..b1fca7db1015 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx.c | |||
@@ -27,6 +27,8 @@ | |||
27 | * P/N 861040-0000: Sensor ST VV6410 ASIC STV0610 - QuickCam Web | 27 | * P/N 861040-0000: Sensor ST VV6410 ASIC STV0610 - QuickCam Web |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
31 | |||
30 | #include <linux/input.h> | 32 | #include <linux/input.h> |
31 | #include "stv06xx_sensor.h" | 33 | #include "stv06xx_sensor.h" |
32 | 34 | ||
@@ -189,7 +191,7 @@ int stv06xx_read_sensor(struct sd *sd, const u8 address, u16 *value) | |||
189 | 0x04, 0x40, 0x1400, 0, buf, I2C_BUFFER_LENGTH, | 191 | 0x04, 0x40, 0x1400, 0, buf, I2C_BUFFER_LENGTH, |
190 | STV06XX_URB_MSG_TIMEOUT); | 192 | STV06XX_URB_MSG_TIMEOUT); |
191 | if (err < 0) { | 193 | if (err < 0) { |
192 | err("I2C: Read error writing address: %d", err); | 194 | pr_err("I2C: Read error writing address: %d\n", err); |
193 | return err; | 195 | return err; |
194 | } | 196 | } |
195 | 197 | ||
@@ -213,14 +215,14 @@ static void stv06xx_dump_bridge(struct sd *sd) | |||
213 | int i; | 215 | int i; |
214 | u8 data, buf; | 216 | u8 data, buf; |
215 | 217 | ||
216 | info("Dumping all stv06xx bridge registers"); | 218 | pr_info("Dumping all stv06xx bridge registers\n"); |
217 | for (i = 0x1400; i < 0x160f; i++) { | 219 | for (i = 0x1400; i < 0x160f; i++) { |
218 | stv06xx_read_bridge(sd, i, &data); | 220 | stv06xx_read_bridge(sd, i, &data); |
219 | 221 | ||
220 | info("Read 0x%x from address 0x%x", data, i); | 222 | pr_info("Read 0x%x from address 0x%x\n", data, i); |
221 | } | 223 | } |
222 | 224 | ||
223 | info("Testing stv06xx bridge registers for writability"); | 225 | pr_info("Testing stv06xx bridge registers for writability\n"); |
224 | for (i = 0x1400; i < 0x160f; i++) { | 226 | for (i = 0x1400; i < 0x160f; i++) { |
225 | stv06xx_read_bridge(sd, i, &data); | 227 | stv06xx_read_bridge(sd, i, &data); |
226 | buf = data; | 228 | buf = data; |
@@ -228,12 +230,12 @@ static void stv06xx_dump_bridge(struct sd *sd) | |||
228 | stv06xx_write_bridge(sd, i, 0xff); | 230 | stv06xx_write_bridge(sd, i, 0xff); |
229 | stv06xx_read_bridge(sd, i, &data); | 231 | stv06xx_read_bridge(sd, i, &data); |
230 | if (data == 0xff) | 232 | if (data == 0xff) |
231 | info("Register 0x%x is read/write", i); | 233 | pr_info("Register 0x%x is read/write\n", i); |
232 | else if (data != buf) | 234 | else if (data != buf) |
233 | info("Register 0x%x is read/write," | 235 | pr_info("Register 0x%x is read/write, but only partially\n", |
234 | " but only partially", i); | 236 | i); |
235 | else | 237 | else |
236 | info("Register 0x%x is read-only", i); | 238 | pr_info("Register 0x%x is read-only\n", i); |
237 | 239 | ||
238 | stv06xx_write_bridge(sd, i, buf); | 240 | stv06xx_write_bridge(sd, i, buf); |
239 | } | 241 | } |