On Fri, Jun 3, 2011 at 19:30, Scott Jiang wrote:
> +#include <asm/gpio.h>

linux/gpio.h

> +#ifdef CONFIG_BFIN548_EZKIT
> +#define VS6624_CE       GPIO_PG6
> +#else
> +#define VS6624_CE       GPIO_PF10
> +#endif

this has to be moved to the platform data

> +static inline int vs6624_read(struct v4l2_subdev *sd, u16 index)
> +{
> +     u8 buf[2];
> +
> +     buf[1] = index & 0xFF;

buf is of type u8, so the 0xff mask is redundant

> +static inline int vs6624_write(struct v4l2_subdev *sd, u16 index,
> +                             u8 value)
> +{
> +     u8 buf[3];
> +
> +     buf[1] = index & 0xFF;

buf is of type u8, so the 0xff mask is redundant

> +static inline int vs6624_read(struct v4l2_subdev *sd, u16 index)
> +static inline int vs6624_write(struct v4l2_subdev *sd, u16 index,
> +                             u8 value)

these might be a little too big to force "inline".  i'd drop that and
let gcc decide.

> +static int vs6624_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm
> *parms)
> +{
> +     struct vs6624 *sensor = to_vs6624(sd);
> +     struct v4l2_captureparm *cp = &parms->parm.capture;
> +
> +     if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
> +             return -EINVAL;
> +
> +     memset(cp, 0, sizeof(struct v4l2_captureparm));

sizeof(*cp)

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

__devinit

> +             printk(KERN_ERR "failed to request GPIO %d\n", VS6624_CE);

you should be able to use pr_err(&client->dev) i think ...

> +     mdelay(100);

pretty big delay ... needs a comment ...

> +     sensor = kzalloc(sizeof(struct vs6624), GFP_KERNEL);

sizeof(*sensor)

> +static int vs6624_remove(struct i2c_client *client)

__devexit

> +static struct i2c_driver vs6624_driver = {
> +     .remove         = vs6624_remove,

__devexit_p()

> --- /dev/null
> +++ b/drivers/media/video/vs6624_regs.h
> +#define      VS6624_MICRO_EN               0xC003 /* power enable for all MCU

dont use tabs after #define
-mike
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to