mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: x86@kernel.org,
	Jerome Oufella <jerome.oufella@savoirfairelinux.com>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org,
	Guenter Roeck <guenter.roeck@ericsson.com>,
	Jean Delvare <khali@linux-fr.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	Linus Walleij <linus.walleij@stericsson.com>
Subject: Re: [PATCH v6 3/3] gpio: TS-5500 GPIO support
Date: Fri, 13 Apr 2012 20:04:42 +0100	[thread overview]
Message-ID: <20120413190442.GA8275@sirena.org.uk> (raw)
In-Reply-To: <1334276935-11258-4-git-send-email-vivien.didelot@savoirfairelinux.com>

On Thu, Apr 12, 2012 at 08:28:55PM -0400, Vivien Didelot wrote:

Guess I won't wait for a more thorough off list review :)

> +static void ts5500_gpio_release(struct device *dev)
> +{
> +	/* noop */
> +}

So, this really shouldn't be here...

> +static int __devinit ts5500_gpio_probe(struct platform_device *pdev)
> +{
> +	int ret;
> +	unsigned long flags;
> +
> +	if (pdev == NULL)
> +		return -ENODEV;

Don't bother, the kernel got seriously confused if this happens.

> +	ret = platform_device_register(&ts5500_gpio_pdev);
> +	if (ret) {
> +		platform_driver_unregister(&ts5500_gpio_driver);
> +		return ret;
> +	}

...probably what your release function should do is free the device
which should be dynamically allocated here, platform_device_alloc() will
do the right thing for you.  This isn't usually an issue for static
platform devices as they are registered from board files which can't be
unloaded.

  reply	other threads:[~2012-04-13 19:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13  0:28 [PATCH v6 0/3] TS-5500 platform support Vivien Didelot
2012-04-13  0:28 ` [PATCH v6 1/3] hwmon: Maxim MAX197 support Vivien Didelot
2012-04-14  0:46   ` Guenter Roeck
2012-04-13  0:28 ` [PATCH v6 2/3] x86/platform: TS-5500 basic platform support Vivien Didelot
2012-04-13 10:37   ` Thomas Gleixner
2012-04-13 20:46     ` Vivien Didelot
2012-04-13  0:28 ` [PATCH v6 3/3] gpio: TS-5500 GPIO support Vivien Didelot
2012-04-13 19:04   ` Mark Brown [this message]
2012-05-17 21:06   ` Grant Likely
2012-05-17 21:14     ` Joe Perches
2012-05-17 21:40     ` Vivien Didelot
2012-05-17 22:59       ` Grant Likely
2012-05-18 14:37         ` Vivien Didelot
2012-05-18 19:59           ` Grant Likely

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=20120413190442.GA8275@sirena.org.uk \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=grant.likely@secretlab.ca \
    --cc=guenter.roeck@ericsson.com \
    --cc=hpa@zytor.com \
    --cc=jerome.oufella@savoirfairelinux.com \
    --cc=khali@linux-fr.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=vivien.didelot@savoirfairelinux.com \
    --cc=x86@kernel.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®