aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/m5602/m5602_mt9m111.c
diff options
context:
space:
mode:
authorErik Andren <erik.andren@gmail.com>2008-10-16 15:46:07 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-17 16:39:40 -0400
commit17ea88ae956279b20e7be8e2906212fbdde24f3d (patch)
tree3d53e1bdcfcf0b3f1bba9c562058c700ad2b00a3 /drivers/media/video/gspca/m5602/m5602_mt9m111.c
parent0c505e688bb22c1b4431b4c07cd1fcff22fe37a2 (diff)
V4L/DVB (9280): gspca: Use the gspca debug macros
Signed-off-by: Erik Andren <erik.andren@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/m5602/m5602_mt9m111.c')
-rw-r--r--drivers/media/video/gspca/m5602/m5602_mt9m111.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.c b/drivers/media/video/gspca/m5602/m5602_mt9m111.c
index a0e0bff87dc4..fb700c2d055a 100644
--- a/drivers/media/video/gspca/m5602/m5602_mt9m111.c
+++ b/drivers/media/video/gspca/m5602/m5602_mt9m111.c
@@ -107,7 +107,7 @@ int mt9m111_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
107 err = mt9m111_read_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B, 107 err = mt9m111_read_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B,
108 data, 2); 108 data, 2);
109 *val = data[0] & MT9M111_RMB_MIRROR_ROWS; 109 *val = data[0] & MT9M111_RMB_MIRROR_ROWS;
110 PDEBUG(DBG_V4L2_CID, "Read vertical flip %d", *val); 110 PDEBUG(D_V4L2, "Read vertical flip %d", *val);
111 111
112 return (err < 0) ? err : 0; 112 return (err < 0) ? err : 0;
113} 113}
@@ -118,7 +118,7 @@ int mt9m111_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
118 u8 data[2] = {0x00, 0x00}; 118 u8 data[2] = {0x00, 0x00};
119 struct sd *sd = (struct sd *) gspca_dev; 119 struct sd *sd = (struct sd *) gspca_dev;
120 120
121 PDEBUG(DBG_V4L2_CID, "Set vertical flip to %d", val); 121 PDEBUG(D_V4L2, "Set vertical flip to %d", val);
122 122
123 /* Set the correct page map */ 123 /* Set the correct page map */
124 err = mt9m111_write_sensor(sd, MT9M111_PAGE_MAP, data, 2); 124 err = mt9m111_write_sensor(sd, MT9M111_PAGE_MAP, data, 2);
@@ -145,7 +145,7 @@ int mt9m111_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
145 err = mt9m111_read_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B, 145 err = mt9m111_read_sensor(sd, MT9M111_SC_R_MODE_CONTEXT_B,
146 data, 2); 146 data, 2);
147 *val = data[0] & MT9M111_RMB_MIRROR_COLS; 147 *val = data[0] & MT9M111_RMB_MIRROR_COLS;
148 PDEBUG(DBG_V4L2_CID, "Read horizontal flip %d", *val); 148 PDEBUG(D_V4L2, "Read horizontal flip %d", *val);
149 149
150 return (err < 0) ? err : 0; 150 return (err < 0) ? err : 0;
151} 151}
@@ -156,7 +156,7 @@ int mt9m111_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
156 u8 data[2] = {0x00, 0x00}; 156 u8 data[2] = {0x00, 0x00};
157 struct sd *sd = (struct sd *) gspca_dev; 157 struct sd *sd = (struct sd *) gspca_dev;
158 158
159 PDEBUG(DBG_V4L2_CID, "Set horizontal flip to %d", val); 159 PDEBUG(D_V4L2, "Set horizontal flip to %d", val);
160 160
161 /* Set the correct page map */ 161 /* Set the correct page map */
162 err = mt9m111_write_sensor(sd, MT9M111_PAGE_MAP, data, 2); 162 err = mt9m111_write_sensor(sd, MT9M111_PAGE_MAP, data, 2);
@@ -188,7 +188,7 @@ int mt9m111_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
188 ((tmp & (1 << 8)) * 2) | 188 ((tmp & (1 << 8)) * 2) |
189 (tmp & 0x7f); 189 (tmp & 0x7f);
190 190
191 PDEBUG(DBG_V4L2_CID, "Read gain %d", *val); 191 PDEBUG(D_V4L2, "Read gain %d", *val);
192 192
193 return (err < 0) ? err : 0; 193 return (err < 0) ? err : 0;
194} 194}
@@ -222,7 +222,7 @@ int mt9m111_set_gain(struct gspca_dev *gspca_dev, __s32 val)
222 222
223 data[1] = (tmp & 0xff00) >> 8; 223 data[1] = (tmp & 0xff00) >> 8;
224 data[0] = (tmp & 0xff); 224 data[0] = (tmp & 0xff);
225 PDEBUG(DBG_V4L2_CID, "tmp=%d, data[1]=%d, data[0]=%d", tmp, 225 PDEBUG(D_V4L2, "tmp=%d, data[1]=%d, data[0]=%d", tmp,
226 data[1], data[0]); 226 data[1], data[0]);
227 227
228 err = mt9m111_write_sensor(sd, MT9M111_SC_GLOBAL_GAIN, 228 err = mt9m111_write_sensor(sd, MT9M111_SC_GLOBAL_GAIN,
@@ -257,7 +257,7 @@ int mt9m111_read_sensor(struct sd *sd, const u8 address,
257 for (i = 0; i < len && !err; i++) { 257 for (i = 0; i < len && !err; i++) {
258 err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i])); 258 err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i]));
259 259
260 PDEBUG(DBG_TRACE, "Reading sensor register " 260 PDEBUG(D_CONF, "Reading sensor register "
261 "0x%x contains 0x%x ", address, *i2c_data); 261 "0x%x contains 0x%x ", address, *i2c_data);
262 } 262 }
263out: 263out:
@@ -290,7 +290,7 @@ int mt9m111_write_sensor(struct sd *sd, const u8 address,
290 memcpy(p, sensor_urb_skeleton + 16, 4); 290 memcpy(p, sensor_urb_skeleton + 16, 4);
291 p[3] = i2c_data[i]; 291 p[3] = i2c_data[i];
292 p += 4; 292 p += 4;
293 PDEBUG(DBG_TRACE, "Writing sensor register 0x%x with 0x%x", 293 PDEBUG(D_CONF, "Writing sensor register 0x%x with 0x%x",
294 address, i2c_data[i]); 294 address, i2c_data[i]);
295 } 295 }
296 296