All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Denis Carikli <denis@eukrea.com>
Cc: "Lothar Waßmann" <LW@KARO-electronics.de>,
	linux-input@vger.kernel.org,
	"Sascha Hauer" <kernel@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	"Eric Bénard" <eric@eukrea.com>,
	"Rob Herring" <rob.herring@calxeda.com>,
	"Pawel Moll" <pawel.moll@arm.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Stephen Warren" <swarren@wwwdotorg.org>,
	"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
	devicetree@vger.kernel.org
Subject: Re: [PATCHv4][ 1/4] Input: tsc2007: Add device tree support.
Date: Mon, 21 Oct 2013 08:59:27 -0700	[thread overview]
Message-ID: <20131021155927.GB4255@core.coreip.homeip.net> (raw)
In-Reply-To: <1382363667-10341-1-git-send-email-denis@eukrea.com>

Hi Denis,

On Mon, Oct 21, 2013 at 03:54:24PM +0200, Denis Carikli wrote:
>  
> +	if (ts->of)
> +		return tsc2007_get_pendown_state_dt(ts);
> +
>  	if (!ts->get_pendown_state)
>  		return true;

Instead of special casing "if (ts->of)" all over the place why don't you
set up the device structure as:

	if (<configuring_tsc2007_form_dt>)
		ts->get_pendown_state = tsc2007_get_pendown_state_dt;

and be done with it?

Thanks.

-- 
Dmitry

WARNING: multiple messages have this Message-ID (diff)
From: dmitry.torokhov@gmail.com (Dmitry Torokhov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv4][ 1/4] Input: tsc2007: Add device tree support.
Date: Mon, 21 Oct 2013 08:59:27 -0700	[thread overview]
Message-ID: <20131021155927.GB4255@core.coreip.homeip.net> (raw)
In-Reply-To: <1382363667-10341-1-git-send-email-denis@eukrea.com>

Hi Denis,

On Mon, Oct 21, 2013 at 03:54:24PM +0200, Denis Carikli wrote:
>  
> +	if (ts->of)
> +		return tsc2007_get_pendown_state_dt(ts);
> +
>  	if (!ts->get_pendown_state)
>  		return true;

Instead of special casing "if (ts->of)" all over the place why don't you
set up the device structure as:

	if (<configuring_tsc2007_form_dt>)
		ts->get_pendown_state = tsc2007_get_pendown_state_dt;

and be done with it?

Thanks.

-- 
Dmitry

  parent reply	other threads:[~2013-10-21 15:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21 13:54 [PATCHv4][ 1/4] Input: tsc2007: Add device tree support Denis Carikli
2013-10-21 13:54 ` Denis Carikli
2013-10-21 13:54 ` [PATCHv4][ 2/4] ARM: dts: cpuimx51 Add touchscreen support Denis Carikli
2013-10-21 13:54   ` Denis Carikli
2013-10-21 13:54 ` [PATCHv4][ 3/4] ARM: dts: cpuimx35 " Denis Carikli
2013-10-21 13:54   ` Denis Carikli
2013-10-21 13:54 ` [PATCHv4][ 4/4] ARM: imx_v6_v7_defconfig: Enable tsc2007 support Denis Carikli
2013-10-21 13:54   ` Denis Carikli
2013-10-21 15:59 ` Dmitry Torokhov [this message]
2013-10-21 15:59   ` [PATCHv4][ 1/4] Input: tsc2007: Add device tree support Dmitry Torokhov
2013-10-22  9:49   ` Lothar Waßmann
2013-10-22  9:49     ` Lothar Waßmann
2013-10-22 22:35     ` Dmitry Torokhov
2013-10-22 22:35       ` Dmitry Torokhov
2013-10-23  7:25       ` Lothar Waßmann
2013-10-23  7:25         ` Lothar Waßmann
2013-10-23  7:53         ` Dmitry Torokhov
2013-10-23  7:53           ` Dmitry Torokhov
2013-10-23  8:21       ` Thierry Reding
2013-10-23  8:21         ` Thierry Reding

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=20131021155927.GB4255@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=LW@KARO-electronics.de \
    --cc=denis@eukrea.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eric@eukrea.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=rob.herring@calxeda.com \
    --cc=swarren@wwwdotorg.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.