All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Ribeiro <drwyrm@gmail.com>
To: Antonio Ospite <ospite@studenti.unina.it>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org,
	openezx-devel <openezx-devel@lists.openezx.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Harald Welte <laforge@gnumonks.org>,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH] PCAP touchscreen driver (for 2.6.32)
Date: Sun, 28 Jun 2009 14:45:16 -0300	[thread overview]
Message-ID: <1246211116.20525.8.camel@brutus> (raw)
In-Reply-To: <20090628163542.89473418.ospite@studenti.unina.it>

[-- Attachment #1: Type: text/plain, Size: 1462 bytes --]

Em Dom, 2009-06-28 às 16:35 +0200, Antonio Ospite escreveu:
> > +	pcap_ts->pcap = platform_get_drvdata(pdev);
> > +	platform_set_drvdata(pdev, pcap_ts);
> > +
> > +	input_dev = input_allocate_device();
> > +	if (!pcap_ts || !input_dev)
> 
> Can pcap_ts be ever NULL here? This test can be simplified.

Right, it really can't be NULL. I will fix it.

> > +#ifdef CONFIG_PM
> > +static int pcap_ts_suspend(struct platform_device *pdev, pm_message_t state)
> > +{
> > +	struct pcap_ts *pcap_ts = platform_get_drvdata(pdev);
> > +
> > +	pcap_set_ts_bits(pcap_ts->pcap, PCAP_ADC_TS_REF_LOWPWR);
> > +	return 0;
> > +}
> > +
> > +static int pcap_ts_resume(struct platform_device *pdev)
> > +{
> > +	struct pcap_ts *pcap_ts = platform_get_drvdata(pdev);
> > +
> > +	pcap_set_ts_bits(pcap_ts->pcap,
> > +				pcap_ts->read_state << PCAP_ADC_TS_M_SHIFT);
> > +	return 0;
> > +}
> > +#endif
> > +
> 
> define the suspend/resume callbacks as NULL in a #else here and remove
> the #ifdef CONFIG_PM below? That seems to be the most used style.
> 
> > +static struct platform_driver pcap_ts_driver = {
> > +	.probe		= pcap_ts_probe,
> > +	.remove		= __devexit_p(pcap_ts_remove),
> > +#ifdef CONFIG_PM
> > +	.suspend	= pcap_ts_suspend,
> > +	.resume		= pcap_ts_resume,
> > +#endif
> > +	.driver		= {
> > +		.name	= "pcap-ts",
> > +		.owner	= THIS_MODULE,
> > +	},
> > +};

Ok.

Thanks for the review! :)

-- 
Daniel Ribeiro

[-- Attachment #2: Esta é uma parte de mensagem assinada digitalmente --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-06-28 17:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-27 17:02 [PATCH] PCAP touchscreen driver (for 2.6.32) Daniel Ribeiro
2009-06-27 17:02 ` Daniel Ribeiro
2009-06-28  7:15 ` Trilok Soni
2009-06-28  7:15   ` Trilok Soni
2009-06-28 17:49   ` Daniel Ribeiro
2009-06-28 17:49     ` Daniel Ribeiro
2009-06-29  6:19   ` Dmitry Torokhov
2009-06-29  6:19     ` Dmitry Torokhov
2009-06-28 14:35 ` Antonio Ospite
2009-06-28 17:45   ` Daniel Ribeiro [this message]
2009-06-29  6:29 ` Dmitry Torokhov

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=1246211116.20525.8.camel@brutus \
    --to=drwyrm@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=laforge@gnumonks.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openezx-devel@lists.openezx.org \
    --cc=ospite@studenti.unina.it \
    --cc=sameo@linux.intel.com \
    /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.