[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120413190442.GA8275@sirena.org.uk>
Date: Fri, 13 Apr 2012 20:04:42 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc: x86@...nel.org,
Jerome Oufella <jerome.oufella@...oirfairelinux.com>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
lm-sensors@...sensors.org,
Guenter Roeck <guenter.roeck@...csson.com>,
Jean Delvare <khali@...ux-fr.org>,
Grant Likely <grant.likely@...retlab.ca>,
Linus Walleij <linus.walleij@...ricsson.com>
Subject: Re: [PATCH v6 3/3] gpio: TS-5500 GPIO support
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists