mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Antonio Ospite <ospite@studenti.unina.it>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, openezx-devel@lists.openezx.org,
	"John W . Linville" <linville@tuxdriver.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	linux-kernel@vger.kernel.org, Marek Vasut <marek.vasut@gmail.com>,
	Guiming Zhuo <gmzhuo@gmail.com>
Subject: Re: [PATCH v3] rfkill: Regulator consumer driver for rfkill
Date: Thu, 14 Apr 2011 12:39:12 +0200	[thread overview]
Message-ID: <20110414123912.71e4bd52.ospite@studenti.unina.it> (raw)
In-Reply-To: <1302724383.3731.19.camel@jlt3.sipsolutions.net>

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

On Wed, 13 Apr 2011 21:53:03 +0200
Johannes Berg <johannes@sipsolutions.net> wrote:

> On Wed, 2011-04-13 at 21:40 +0200, Antonio Ospite wrote:
> 
> > +static int __devinit rfkill_regulator_probe(struct platform_device *pdev)
> 
> ...
> 
> > +	platform_set_drvdata(pdev, rfkill_data);
> 
> > +static int __devexit rfkill_regulator_remove(struct platform_device *pdev)
> > +{
> > +	struct rfkill_regulator_data *rfkill_data = platform_get_drvdata(pdev);
> > +	struct rfkill *rf_kill = rfkill_data->rf_kill;
> > +
> > +	rfkill_unregister(rf_kill);
> > +	rfkill_destroy(rf_kill);
> > +	regulator_put(rfkill_data->vcc);
> > +	kfree(rfkill_data);
> > +
> > +	return 0;
> > +}
> 
> Should remove do platform_set_drvdata(pdev, NULL)?
>

AFAICS this is not strictly necessary because we never check for NULL
here and we are setting drvdata again in _probe() each time the module
is loaded anyways. If it is considered a good practice for symmetry
reasons then I'll add it, no problem. Does anyone has comments on that?

> In any case, that's the only thing I see now and I did read the code
> carefully, so if that's not necessary:
> 
> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> 
> Otherwise, feel free to include that in v4.
> 
> johannes
> 

Thanks for taking the time to look at the code Johannes.

Regards,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2011-04-14 10:39 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06  9:21 [PATCH] " Antonio Ospite
2011-04-06  9:29 ` Johannes Berg
2011-04-06 14:06   ` Antonio Ospite
2011-04-06 14:09     ` Johannes Berg
2011-04-06 14:24       ` Antonio Ospite
2011-04-06 14:50         ` Joey Lee
2011-04-08 10:59   ` [PATCH v2] " Antonio Ospite
2011-04-12 11:41     ` Johannes Berg
2011-04-12 11:44       ` Johannes Berg
2011-04-12 15:15         ` Mark Brown
2011-04-12 15:23           ` Johannes Berg
2011-04-13 16:53             ` Mark Brown
2011-04-13  8:44         ` Antonio Ospite
2011-04-13  9:19           ` Johannes Berg
2011-04-13 19:40             ` [PATCH v3] " Antonio Ospite
2011-04-13 19:53               ` Johannes Berg
2011-04-14 10:39                 ` Antonio Ospite [this message]
2011-04-14 13:06                   ` Mark Brown
2011-04-15 10:24                     ` Antonio Ospite
2011-04-13  8:53       ` [PATCH v2] " Antonio Ospite
2011-04-06 14:11 ` [PATCH] " Mark Brown
2011-04-06 14:21   ` Johannes Berg
2011-04-06 18:12     ` Paul Bolle
2011-04-06 18:38       ` John W. Linville
2011-04-06 20:10         ` Paul Bolle
2011-04-06 20:15           ` Johannes Berg
2011-04-06 20:17             ` Johannes Berg
2011-04-06 20:19               ` Johannes Berg
2011-04-06 18:46       ` Johannes Berg
2011-04-07 10:01         ` Bernd Petrovitsch
2011-04-07 10:09           ` Johannes Berg
2011-04-07 10:33             ` Bernd Petrovitsch
2011-04-07 10:42               ` depends on tristate logic (was: [PATCH] rfkill: Regulator consumer driver for rfkill) Johannes Berg
2011-04-06 14:29   ` [PATCH] rfkill: Regulator consumer driver for rfkill Antonio Ospite
2011-04-06 14:32     ` Johannes Berg

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=20110414123912.71e4bd52.ospite@studenti.unina.it \
    --to=ospite@studenti.unina.it \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=gmzhuo@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=marek.vasut@gmail.com \
    --cc=openezx-devel@lists.openezx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®