All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Fabio Estevam <festevam@gmail.com>
Cc: linux-iio@vger.kernel.org,
	Fabio Estevam <fabio.estevam@freescale.com>,
	Shawn Guo <shawn.guo@linaro.org>,
	Jonathan Cameron <jic23@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/3 V2] iio: mxs: Implement support for touchscreen
Date: Fri, 14 Dec 2012 03:04:43 +0100	[thread overview]
Message-ID: <201212140304.43291.marex@denx.de> (raw)
In-Reply-To: <CAOMZO5DDcPpePEiJe0hg0Er60OBuJM+Rik1CSc9zcphycpEr4g@mail.gmail.com>

Dear Fabio Estevam,

> Hi Marek,
> 
> On Thu, Dec 13, 2012 at 11:46 PM, Marek Vasut <marex@denx.de> wrote:
> > +static int mxs_lradc_ts_register(struct mxs_lradc *lradc)
> > +{
> > +       struct input_dev *input;
> > +       struct device *dev = lradc->dev;
> > +       int ret;
> > +
> > +       if (!lradc->use_touchscreen)
> > +               return 0;
> 
> Shouldn't we return an error code here?

No, why ? No touchscreen present, we register nothing.

> > +
> > +       input = input_allocate_device();
> > +       if (!input) {
> > +               dev_warn(dev, "Failed to allocate TS device,
> > disabling.\n"); +               lradc->use_touchscreen =
> > MXS_LRADC_TOUCHSCREEN_NONE; +               return 0;
> > +       }
> 
> Shouldn't we return an error code here?

Yes.

> Regards,
> 
> Fabio Estevam

Best regards,
Marek Vasut

WARNING: multiple messages have this Message-ID (diff)
From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3 V2] iio: mxs: Implement support for touchscreen
Date: Fri, 14 Dec 2012 03:04:43 +0100	[thread overview]
Message-ID: <201212140304.43291.marex@denx.de> (raw)
In-Reply-To: <CAOMZO5DDcPpePEiJe0hg0Er60OBuJM+Rik1CSc9zcphycpEr4g@mail.gmail.com>

Dear Fabio Estevam,

> Hi Marek,
> 
> On Thu, Dec 13, 2012 at 11:46 PM, Marek Vasut <marex@denx.de> wrote:
> > +static int mxs_lradc_ts_register(struct mxs_lradc *lradc)
> > +{
> > +       struct input_dev *input;
> > +       struct device *dev = lradc->dev;
> > +       int ret;
> > +
> > +       if (!lradc->use_touchscreen)
> > +               return 0;
> 
> Shouldn't we return an error code here?

No, why ? No touchscreen present, we register nothing.

> > +
> > +       input = input_allocate_device();
> > +       if (!input) {
> > +               dev_warn(dev, "Failed to allocate TS device,
> > disabling.\n"); +               lradc->use_touchscreen =
> > MXS_LRADC_TOUCHSCREEN_NONE; +               return 0;
> > +       }
> 
> Shouldn't we return an error code here?

Yes.

> Regards,
> 
> Fabio Estevam

Best regards,
Marek Vasut

  reply	other threads:[~2012-12-14  2:04 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14  1:46 [PATCH 1/3 V2] iio: mxs: Remove unused struct mxs_lradc_chan Marek Vasut
2012-12-14  1:46 ` Marek Vasut
2012-12-14  1:46 ` [PATCH 2/3 V2] iio: mxs: Implement support for touchscreen Marek Vasut
2012-12-14  1:46   ` Marek Vasut
2012-12-14  1:58   ` Fabio Estevam
2012-12-14  1:58     ` Fabio Estevam
2012-12-14  2:04     ` Marek Vasut [this message]
2012-12-14  2:04       ` Marek Vasut
2012-12-19 17:01   ` Marek Vasut
2012-12-19 17:01     ` Marek Vasut
2012-12-27 12:16     ` Jonathan Cameron
2012-12-27 12:16       ` Jonathan Cameron
2013-01-08 19:28       ` Marek Vasut
2013-01-08 19:28         ` Marek Vasut
2013-01-09 20:01         ` Jonathan Cameron
2013-01-09 20:01           ` Jonathan Cameron
2013-01-09 20:17           ` Marek Vasut
2013-01-09 20:17             ` Marek Vasut
2013-01-09 21:38             ` Jonathan Cameron
2013-01-09 21:38               ` Jonathan Cameron
2013-01-09 21:54               ` Marek Vasut
2013-01-09 21:54                 ` Marek Vasut
2013-01-10  0:57     ` Dmitry Torokhov
2013-01-10  0:57       ` Dmitry Torokhov
2013-01-10  9:48       ` Marek Vasut
2013-01-10  9:48         ` Marek Vasut
2013-01-10 17:46         ` Dmitry Torokhov
2013-01-10 17:46           ` Dmitry Torokhov
2013-01-10 18:19           ` Lars-Peter Clausen
2013-01-10 18:19             ` Lars-Peter Clausen
2013-01-10 18:44             ` Dmitry Torokhov
2013-01-10 18:44               ` Dmitry Torokhov
2012-12-27 11:31   ` Jonathan Cameron
2012-12-27 11:31     ` Jonathan Cameron
     [not found]     ` <50DC319B.1050607-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-12-27 18:19       ` Marek Vasut
2012-12-27 18:19         ` Marek Vasut
2012-12-27 18:19         ` Marek Vasut
2012-12-14  1:46 ` [PATCH 3/3] iio: mxs: Enable touchscreen on m28evk Marek Vasut
2012-12-14  1:46   ` Marek Vasut
2012-12-27 11:25 ` [PATCH 1/3 V2] iio: mxs: Remove unused struct mxs_lradc_chan Jonathan Cameron
2012-12-27 11:25   ` Jonathan Cameron

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=201212140304.43291.marex@denx.de \
    --to=marex@denx.de \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=shawn.guo@linaro.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.