[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100227080926.GE793@core.coreip.homeip.net>
Date: Sat, 27 Feb 2010 00:09:26 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Matthew Garrett <mjg@...hat.com>
Cc: torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/14] dell-laptop: Fix platform device unregistration
On Fri, Feb 26, 2010 at 10:18:38AM -0500, Matthew Garrett wrote:
> dell-laptop currently fails to clean up its platform device correctly.
> Make sure that it's unregistered.
>
> Signed-off-by: Matthew Garrett <mjg@...hat.com>
> ---
> drivers/platform/x86/dell-laptop.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
> index 9d7e0be..b4c2190 100644
> --- a/drivers/platform/x86/dell-laptop.c
> +++ b/drivers/platform/x86/dell-laptop.c
> @@ -474,6 +474,10 @@ static void __exit dell_exit(void)
> i8042_remove_filter(dell_laptop_i8042_filter);
> backlight_device_unregister(dell_backlight_device);
> dell_cleanup_rfkill();
> + if (platform_device) {
> + platform_device_del(platform_device);
That should be platform_device_unregister(), otherwise you are missing
final platform_device_put().
> + platform_driver_unregister(&platform_driver);
> + }
> }
>
--
Dmitry
--
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