All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@zonque.org>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v2 2/3] input: touch: ads7846: switch to devm initialization
Date: Wed, 6 May 2020 08:54:36 +0200	[thread overview]
Message-ID: <c0f3d222-7a35-1f92-d83f-8bb19f1d87d7@zonque.org> (raw)
In-Reply-To: <20200505083701.GB18755@pengutronix.de>

Hi Marco,

On 5/5/20 10:37 AM, Marco Felsch wrote:
> also here, pls align the patch subject with the existing ones, so the
> prefix should be "Input: ads7846 - ".
> 
> On 20-05-04 19:37, Daniel Mack wrote:
>> This simplies the code a lot and fixes some potential resource leaks in
>> the error return paths. It also ensures the input device is registered
>> before the interrupt is requested, as the IRQ handler will commit events
>> when it fires.
> 
> Pls adapt the commit message too.
> 
>> Signed-off-by: Daniel Mack <daniel@zonque.org>

>> -static void ads784x_hwmon_unregister(struct spi_device *spi,
>> -				     struct ads7846 *ts)
>> -{
>> -	if (ts->hwmon)
>> -		hwmon_device_unregister(ts->hwmon);
>> +	return PTR_ERR_OR_ZERO(hwmon);
>>  }
> 
> Nit:
> return PTR_ERR_OR_ZERO(devm_hwmon_device_register_with_groups())

I tried that before, but it looks ugly and breaks the coding style
rules. So I'll leave that one out.

The rest of your comments I agree with. Thanks again!


Daniel

  parent reply	other threads:[~2020-05-06  6:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 17:37 [PATCH v2 1/3] input: touch: ads7846: add short-hand for spi->dev in probe() function Daniel Mack
2020-05-04 17:37 ` [PATCH v2 2/3] input: touch: ads7846: switch to devm initialization Daniel Mack
2020-05-05  8:37   ` Marco Felsch
2020-05-06  0:05     ` Dmitry Torokhov
2020-05-06  6:38       ` Daniel Mack
2020-05-06  6:54     ` Daniel Mack [this message]
2020-05-04 17:37 ` [PATCH v2 3/3] input: touchscreen: ads7846: switch to gpiod API Daniel Mack
2020-05-05  9:16   ` Marco Felsch
2020-05-05  8:19 ` [PATCH v2 1/3] input: touch: ads7846: add short-hand for spi->dev in probe() function Marco Felsch

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=c0f3d222-7a35-1f92-d83f-8bb19f1d87d7@zonque.org \
    --to=daniel@zonque.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=m.felsch@pengutronix.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 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.