aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tw9910.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-07-30 16:24:54 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:04:51 -0400
commitc4ce6d14b92aa1772c9d84d068d1b45114fe73cc (patch)
treeb2c492597824d43fad603cc686c3d16b3f766b0c /drivers/media/video/tw9910.c
parent401ad27867781c327855025d4becd5bc30fe7e42 (diff)
V4L/DVB: v4l: Use v4l2_get_subdevdata instead of accessing v4l2_subdev::priv
Replace direct access to the v4l2_subdev priv field with the inline v4l2_get_subdevdata method. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tw9910.c')
-rw-r--r--drivers/media/video/tw9910.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c
index a727962781a3..0347bbe36459 100644
--- a/drivers/media/video/tw9910.c
+++ b/drivers/media/video/tw9910.c
@@ -469,7 +469,7 @@ tw9910_select_norm(struct soc_camera_device *icd, u32 width, u32 height)
469 */ 469 */
470static int tw9910_s_stream(struct v4l2_subdev *sd, int enable) 470static int tw9910_s_stream(struct v4l2_subdev *sd, int enable)
471{ 471{
472 struct i2c_client *client = sd->priv; 472 struct i2c_client *client = v4l2_get_subdevdata(sd);
473 struct tw9910_priv *priv = to_tw9910(client); 473 struct tw9910_priv *priv = to_tw9910(client);
474 u8 val; 474 u8 val;
475 int ret; 475 int ret;
@@ -511,7 +511,7 @@ static int tw9910_set_bus_param(struct soc_camera_device *icd,
511 unsigned long flags) 511 unsigned long flags)
512{ 512{
513 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 513 struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
514 struct i2c_client *client = sd->priv; 514 struct i2c_client *client = v4l2_get_subdevdata(sd);
515 u8 val = VSSL_VVALID | HSSL_DVALID; 515 u8 val = VSSL_VVALID | HSSL_DVALID;
516 516
517 /* 517 /*
@@ -565,7 +565,7 @@ static int tw9910_enum_input(struct soc_camera_device *icd,
565static int tw9910_g_chip_ident(struct v4l2_subdev *sd, 565static int tw9910_g_chip_ident(struct v4l2_subdev *sd,
566 struct v4l2_dbg_chip_ident *id) 566 struct v4l2_dbg_chip_ident *id)
567{ 567{
568 struct i2c_client *client = sd->priv; 568 struct i2c_client *client = v4l2_get_subdevdata(sd);
569 struct tw9910_priv *priv = to_tw9910(client); 569 struct tw9910_priv *priv = to_tw9910(client);
570 570
571 id->ident = V4L2_IDENT_TW9910; 571 id->ident = V4L2_IDENT_TW9910;
@@ -578,7 +578,7 @@ static int tw9910_g_chip_ident(struct v4l2_subdev *sd,
578static int tw9910_g_register(struct v4l2_subdev *sd, 578static int tw9910_g_register(struct v4l2_subdev *sd,
579 struct v4l2_dbg_register *reg) 579 struct v4l2_dbg_register *reg)
580{ 580{
581 struct i2c_client *client = sd->priv; 581 struct i2c_client *client = v4l2_get_subdevdata(sd);
582 int ret; 582 int ret;
583 583
584 if (reg->reg > 0xff) 584 if (reg->reg > 0xff)
@@ -600,7 +600,7 @@ static int tw9910_g_register(struct v4l2_subdev *sd,
600static int tw9910_s_register(struct v4l2_subdev *sd, 600static int tw9910_s_register(struct v4l2_subdev *sd,
601 struct v4l2_dbg_register *reg) 601 struct v4l2_dbg_register *reg)
602{ 602{
603 struct i2c_client *client = sd->priv; 603 struct i2c_client *client = v4l2_get_subdevdata(sd);
604 604
605 if (reg->reg > 0xff || 605 if (reg->reg > 0xff ||
606 reg->val > 0xff) 606 reg->val > 0xff)
@@ -613,7 +613,7 @@ static int tw9910_s_register(struct v4l2_subdev *sd,
613static int tw9910_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) 613static int tw9910_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)
614{ 614{
615 struct v4l2_rect *rect = &a->c; 615 struct v4l2_rect *rect = &a->c;
616 struct i2c_client *client = sd->priv; 616 struct i2c_client *client = v4l2_get_subdevdata(sd);
617 struct tw9910_priv *priv = to_tw9910(client); 617 struct tw9910_priv *priv = to_tw9910(client);
618 struct soc_camera_device *icd = client->dev.platform_data; 618 struct soc_camera_device *icd = client->dev.platform_data;
619 int ret = -EINVAL; 619 int ret = -EINVAL;
@@ -701,7 +701,7 @@ tw9910_set_fmt_error:
701 701
702static int tw9910_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) 702static int tw9910_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)
703{ 703{
704 struct i2c_client *client = sd->priv; 704 struct i2c_client *client = v4l2_get_subdevdata(sd);
705 struct tw9910_priv *priv = to_tw9910(client); 705 struct tw9910_priv *priv = to_tw9910(client);
706 706
707 if (!priv->scale) { 707 if (!priv->scale) {
@@ -748,7 +748,7 @@ static int tw9910_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a)
748static int tw9910_g_fmt(struct v4l2_subdev *sd, 748static int tw9910_g_fmt(struct v4l2_subdev *sd,
749 struct v4l2_mbus_framefmt *mf) 749 struct v4l2_mbus_framefmt *mf)
750{ 750{
751 struct i2c_client *client = sd->priv; 751 struct i2c_client *client = v4l2_get_subdevdata(sd);
752 struct tw9910_priv *priv = to_tw9910(client); 752 struct tw9910_priv *priv = to_tw9910(client);
753 753
754 if (!priv->scale) { 754 if (!priv->scale) {
@@ -778,7 +778,7 @@ static int tw9910_g_fmt(struct v4l2_subdev *sd,
778static int tw9910_s_fmt(struct v4l2_subdev *sd, 778static int tw9910_s_fmt(struct v4l2_subdev *sd,
779 struct v4l2_mbus_framefmt *mf) 779 struct v4l2_mbus_framefmt *mf)
780{ 780{
781 struct i2c_client *client = sd->priv; 781 struct i2c_client *client = v4l2_get_subdevdata(sd);
782 struct tw9910_priv *priv = to_tw9910(client); 782 struct tw9910_priv *priv = to_tw9910(client);
783 /* See tw9910_s_crop() - no proper cropping support */ 783 /* See tw9910_s_crop() - no proper cropping support */
784 struct v4l2_crop a = { 784 struct v4l2_crop a = {
@@ -813,7 +813,7 @@ static int tw9910_s_fmt(struct v4l2_subdev *sd,
813static int tw9910_try_fmt(struct v4l2_subdev *sd, 813static int tw9910_try_fmt(struct v4l2_subdev *sd,
814 struct v4l2_mbus_framefmt *mf) 814 struct v4l2_mbus_framefmt *mf)
815{ 815{
816 struct i2c_client *client = sd->priv; 816 struct i2c_client *client = v4l2_get_subdevdata(sd);
817 struct soc_camera_device *icd = client->dev.platform_data; 817 struct soc_camera_device *icd = client->dev.platform_data;
818 const struct tw9910_scale_ctrl *scale; 818 const struct tw9910_scale_ctrl *scale;
819 819