On Fri, Jun 3, 2011 at 19:24, Scott Jiang <[email protected]> wrote:
> +static int adv7183_log_status(struct v4l2_subdev *sd)
> +{
> +     printk(KERN_DEBUG "adv7183: Input control = 0x%02x\n",
> +                     adv7183_read(sd, ADV7183_IN_CTRL));

use v4l2_dbg, or if that doesnt work, pr_debug

> +static int adv7183_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
> +{
> +     if (std == V4L2_STD_ALL)
> +             adv7183_write(sd, ADV7183_IN_CTRL, reg);
> +     else {
> +             if (std == V4L2_STD_PAL_60)
> +                     reg |= 0x60;
> +             else if (std == V4L2_STD_NTSC_443)
> +                     reg |= 0x70;
> +             else if (std == V4L2_STD_PAL_N)
> +                     reg |= 0x90;
> +             else if (std == V4L2_STD_PAL_M)
> +                     reg |= 0xA0;
> +             else if (std == V4L2_STD_PAL_Nc)
> +                     reg |= 0xC0;
> +             else if (std & V4L2_STD_PAL)
> +                     reg |= 0x80;
> +             else if (std & V4L2_STD_NTSC)
> +                     reg |= 0x50;
> +             else if (std & V4L2_STD_SECAM)
> +                     reg |= 0xE0;
> +             else
> +                     return -EINVAL;
> +             adv7183_write(sd, ADV7183_IN_CTRL, reg);
> +     }

use a switch() statement

> +static int adv7183_reset(struct v4l2_subdev *sd, u32 val)
> +{
> +     int reg;
> +
> +     reg = adv7183_read(sd, ADV7183_POW_MANAGE) | 0x80;
> +     adv7183_write(sd, ADV7183_POW_MANAGE, reg);
> +     msleep(20);

that's a pretty long sleep.  you should probably document why.

> +static int adv7183_probe(struct i2c_client *client,
> +                     const struct i2c_device_id *id)

__devinit

> +     decoder = kzalloc(sizeof(struct adv7183), GFP_KERNEL);

sizeof(*decoder)

> +static int adv7183_remove(struct i2c_client *client)

__devexit

> +static struct i2c_driver adv7183_driver = {
> +     .remove         = adv7183_remove,

__devexit_p()

> --- /dev/null
> +++ b/drivers/media/video/adv7183_regs.h
> +#define      ADV7183_IN_CTRL            0x00 /* Input control */

dont use tabs after #define

> --- /dev/null
> +++ b/include/media/adv7183.h
> @@ -0,0 +1,47 @@
> +#define      ADV7183_16BIT_OUT   1

dont use tabs after #define

> --- a/include/media/v4l2-chip-ident.h
> +++ b/include/media/v4l2-chip-ident.h
> @@ -142,6 +142,9 @@ enum {
>       /* module saa6588: just ident 6588 */
>       V4L2_IDENT_SAA6588 = 6588,
>
> +     /* module vs6624: just ident 6624 */
> +     V4L2_IDENT_VS6624 = 6624,

guessing you didnt mean to include this in this patch

you can use `git add -p` to add parts of a file to the current index
-mike
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to