[media] gspca: Remove gspca-specific debug magic
Instead use v4l2_dbg and v4l2_err. Note that the PDEBUG macro is kept to make this patch-set less invasive, but it is simply a wrapper around v4l2_dbg now. Most of the other changes are there to make the dev parameter for the v4l2_xxx macros available everywhere we do logging. Signed-off-by: Theodore Kilgore <kilgota@auburn.edu> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:

committed by
Mauro Carvalho Chehab

부모
70c8ecf54b
커밋
c93396e135
@@ -232,6 +232,7 @@ static void w9968cf_smbus_write_nack(struct sd *sd)
|
||||
|
||||
static void w9968cf_smbus_read_ack(struct sd *sd)
|
||||
{
|
||||
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
|
||||
int sda;
|
||||
|
||||
/* Ensure SDA is high before raising clock to avoid a spurious stop */
|
||||
@@ -248,6 +249,7 @@ static void w9968cf_smbus_read_ack(struct sd *sd)
|
||||
/* SMBus protocol: S Addr Wr [A] Subaddr [A] Value [A] P */
|
||||
static void w9968cf_i2c_w(struct sd *sd, u8 reg, u8 value)
|
||||
{
|
||||
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
|
||||
u16* data = (u16 *)sd->gspca_dev.usb_buf;
|
||||
|
||||
data[0] = 0x082f | ((sd->sensor_addr & 0x80) ? 0x1500 : 0x0);
|
||||
@@ -297,6 +299,7 @@ static void w9968cf_i2c_w(struct sd *sd, u8 reg, u8 value)
|
||||
/* SMBus protocol: S Addr Wr [A] Subaddr [A] P S Addr+1 Rd [A] [Value] NA P */
|
||||
static int w9968cf_i2c_r(struct sd *sd, u8 reg)
|
||||
{
|
||||
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
|
||||
int ret = 0;
|
||||
u8 value;
|
||||
|
||||
@@ -326,7 +329,7 @@ static int w9968cf_i2c_r(struct sd *sd, u8 reg)
|
||||
ret = value;
|
||||
PDEBUG(D_USBI, "i2c [0x%02X] -> 0x%02X", reg, value);
|
||||
} else
|
||||
PDEBUG(D_ERR, "i2c read [0x%02x] failed", reg);
|
||||
PERR("i2c read [0x%02x] failed", reg);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user