linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-input@vger.kernel.org, arnd@arndb.de,
	linux-sh@vger.kernel.org, rjw@sisk.pl, lethal@linux-sh.org
Subject: Re: [PATCH] input: st1232 device tree support
Date: Fri, 30 Mar 2012 23:15:20 -0700	[thread overview]
Message-ID: <20120331061520.GA20406@core.coreip.homeip.net> (raw)
In-Reply-To: <20120330084749.19624.84121.sendpatchset@w520>

Hi Magnus,

On Fri, Mar 30, 2012 at 05:47:49PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> This patch enables DT support for the st1232 driver
> which is primarily used on the sh7372 Mackerel board.
> 
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
> 
>  drivers/input/touchscreen/st1232.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> --- 0001/drivers/input/touchscreen/st1232.c
> +++ work/drivers/input/touchscreen/st1232.c	2012-03-29 14:43:13.000000000 +0900
> @@ -255,6 +255,12 @@ static const struct i2c_device_id st1232
>  };
>  MODULE_DEVICE_TABLE(i2c, st1232_ts_id);
>  
> +static const struct of_device_id st1232_ts_dt_ids[] __devinitconst = {
> +	{ .compatible = "sitronix,st1232", },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, st1232_ts_dt_ids);
> +

Should it be guarder with "#ifdef CONFIG_OF" and then we'd do

	.of_match_table = of_match_ptr(st1232_ts_dt_ids);

?

Thanks.

>  static struct i2c_driver st1232_ts_driver = {
>  	.probe		= st1232_ts_probe,
>  	.remove		= __devexit_p(st1232_ts_remove),
> @@ -262,6 +268,7 @@ static struct i2c_driver st1232_ts_drive
>  	.driver = {
>  		.name	= ST1232_TS_NAME,
>  		.owner	= THIS_MODULE,
> +		.of_match_table = st1232_ts_dt_ids,
>  #ifdef CONFIG_PM
>  		.pm	= &st1232_ts_pm_ops,
>  #endif

-- 
Dmitry

      parent reply	other threads:[~2012-03-31  6:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-30  8:47 [PATCH] input: st1232 device tree support Magnus Damm
2012-03-30 10:31 ` Arnd Bergmann
2012-03-31  6:15 ` Dmitry Torokhov [this message]

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=20120331061520.GA20406@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=arnd@arndb.de \
    --cc=lethal@linux-sh.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=rjw@sisk.pl \
    /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;
as well as URLs for NNTP newsgroup(s).