aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/m5602/m5602_ov7660.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/m5602/m5602_ov7660.c')
-rw-r--r--drivers/media/video/gspca/m5602/m5602_ov7660.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.c b/drivers/media/video/gspca/m5602/m5602_ov7660.c
index b12f60464b3..9a14835c128 100644
--- a/drivers/media/video/gspca/m5602/m5602_ov7660.c
+++ b/drivers/media/video/gspca/m5602/m5602_ov7660.c
@@ -16,6 +16,8 @@
16 * 16 *
17 */ 17 */
18 18
19#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
20
19#include "m5602_ov7660.h" 21#include "m5602_ov7660.h"
20 22
21static int ov7660_get_gain(struct gspca_dev *gspca_dev, __s32 *val); 23static int ov7660_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
@@ -149,7 +151,7 @@ int ov7660_probe(struct sd *sd)
149 151
150 if (force_sensor) { 152 if (force_sensor) {
151 if (force_sensor == OV7660_SENSOR) { 153 if (force_sensor == OV7660_SENSOR) {
152 info("Forcing an %s sensor", ov7660.name); 154 pr_info("Forcing an %s sensor\n", ov7660.name);
153 goto sensor_found; 155 goto sensor_found;
154 } 156 }
155 /* If we want to force another sensor, 157 /* If we want to force another sensor,
@@ -180,10 +182,10 @@ int ov7660_probe(struct sd *sd)
180 if (m5602_read_sensor(sd, OV7660_VER, &ver_id, 1)) 182 if (m5602_read_sensor(sd, OV7660_VER, &ver_id, 1))
181 return -ENODEV; 183 return -ENODEV;
182 184
183 info("Sensor reported 0x%x%x", prod_id, ver_id); 185 pr_info("Sensor reported 0x%x%x\n", prod_id, ver_id);
184 186
185 if ((prod_id == 0x76) && (ver_id == 0x60)) { 187 if ((prod_id == 0x76) && (ver_id == 0x60)) {
186 info("Detected a ov7660 sensor"); 188 pr_info("Detected a ov7660 sensor\n");
187 goto sensor_found; 189 goto sensor_found;
188 } 190 }
189 return -ENODEV; 191 return -ENODEV;
@@ -457,17 +459,16 @@ static int ov7660_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
457static void ov7660_dump_registers(struct sd *sd) 459static void ov7660_dump_registers(struct sd *sd)
458{ 460{
459 int address; 461 int address;
460 info("Dumping the ov7660 register state"); 462 pr_info("Dumping the ov7660 register state\n");
461 for (address = 0; address < 0xa9; address++) { 463 for (address = 0; address < 0xa9; address++) {
462 u8 value; 464 u8 value;
463 m5602_read_sensor(sd, address, &value, 1); 465 m5602_read_sensor(sd, address, &value, 1);
464 info("register 0x%x contains 0x%x", 466 pr_info("register 0x%x contains 0x%x\n", address, value);
465 address, value);
466 } 467 }
467 468
468 info("ov7660 register state dump complete"); 469 pr_info("ov7660 register state dump complete\n");
469 470
470 info("Probing for which registers that are read/write"); 471 pr_info("Probing for which registers that are read/write\n");
471 for (address = 0; address < 0xff; address++) { 472 for (address = 0; address < 0xff; address++) {
472 u8 old_value, ctrl_value; 473 u8 old_value, ctrl_value;
473 u8 test_value[2] = {0xff, 0xff}; 474 u8 test_value[2] = {0xff, 0xff};
@@ -477,9 +478,9 @@ static void ov7660_dump_registers(struct sd *sd)
477 m5602_read_sensor(sd, address, &ctrl_value, 1); 478 m5602_read_sensor(sd, address, &ctrl_value, 1);
478 479
479 if (ctrl_value == test_value[0]) 480 if (ctrl_value == test_value[0])
480 info("register 0x%x is writeable", address); 481 pr_info("register 0x%x is writeable\n", address);
481 else 482 else
482 info("register 0x%x is read only", address); 483 pr_info("register 0x%x is read only\n", address);
483 484
484 /* Restore original value */ 485 /* Restore original value */
485 m5602_write_sensor(sd, address, &old_value, 1); 486 m5602_write_sensor(sd, address, &old_value, 1);