public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: "Linux Media Mailing List" <linux-media@vger.kernel.org>,
	"Teresa Gámez" <t.gamez@phytec.de>
Subject: Re: [PATCH 1/2] V4L: mt9m111: propagate higher level abstraction down in functions
Date: Mon, 06 Jun 2011 22:20:56 +0200	[thread overview]
Message-ID: <4DED36A8.5000300@free.fr> (raw)
In-Reply-To: <Pine.LNX.4.64.1106061918010.11169@axis700.grange>

On 06/06/2011 07:20 PM, Guennadi Liakhovetski wrote:
> It is more convenient to propagate the higher level abstraction - the
> struct mt9m111 object into functions and then retrieve a pointer to
> the i2c client, if needed, than to do the reverse.
Agreed.

One minor point, you ofter replace :
 > -	struct mt9m111 *mt9m111 = to_mt9m111(client);
 > +	struct mt9m111 *mt9m111 = container_of(sd, struct mt9m111, subdev);

Why haven't you replaced the signature of to_mt9m111() into :
static struct mt9m111 *to_mt9m111(const struct v4l2_subdev *sd)
{
	return container_of(sd, struct mt9m111, subdev);
}

This way, each to_mt9m111(client) will become to_mt9m111(sd), and the 
purpose of to_mt9m111() will be kept. Wouldn't that be better ?

Else I agree with everything else.

Cheers.

--
Robert

  parent reply	other threads:[~2011-06-06 20:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06 17:20 [PATCH 1/2] V4L: mt9m111: propagate higher level abstraction down in functions Guennadi Liakhovetski
2011-06-06 17:20 ` [PATCH 2/2] V4L: mt9m111: switch to v4l2-subdev .s_power() method Guennadi Liakhovetski
2011-06-06 20:20 ` Robert Jarzmik [this message]
2011-06-07 10:02   ` [PATCH 1/2] V4L: mt9m111: propagate higher level abstraction down in functions Guennadi Liakhovetski
2011-06-09 19:32     ` Robert Jarzmik
2011-06-13 18:27     ` Robert Jarzmik
2011-06-13 18:46       ` Guennadi Liakhovetski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DED36A8.5000300@free.fr \
    --to=robert.jarzmik@free.fr \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-media@vger.kernel.org \
    --cc=t.gamez@phytec.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox