lkml.org 
[lkml]   [2012]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] extcon: unregister compat link on cleanup
On 09/22/2012 10:41 AM, Peter Huewe wrote:

> Since extcon registers this compat link at device registration
> (extcon_dev_register), we should probably remove them at deregistration/cleanup.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
> ---

Applied, thank you.

Also, there were some minor issue, but I fixed them up.

You will check it after some hours on below git repository.
-
http://git.infradead.org/users/kmpark/linux-samsung/shortlog/refs/heads/extcon-for-next


> drivers/extcon/extcon_class.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/extcon/extcon_class.c b/drivers/extcon/extcon_class.c
> index 6e914d0..7610b4e 100644
> --- a/drivers/extcon/extcon_class.c
> +++ b/drivers/extcon/extcon_class.c
> @@ -575,6 +575,11 @@ static void extcon_cleanup(struct extcon_dev *edev, bool skip)
> kfree(edev->cables);
> }
>
> +#if defined(CONFIG_ANDROID)
> + if (switch_class)
> + ret = class_compat_remove_link(switch_class, edev->dev,
> + NULL);
> +#endif /* CONFIG_ANDROID */


This patch have build break which show below log because 'ret' variable
isn't defined on extcon_cleanup function and class_compat_remove_link
function return void type after function call. So, I remove 'ret' variable.

drivers/extcon/extcon-class.c: In function 'extcon_cleanup':
drivers/extcon/extcon-class.c:574: error: 'ret' undeclared (first use in
this function)
drivers/extcon/extcon-class.c:574: error: (Each undeclared identifier is
reported only once
drivers/extcon/extcon-class.c:574: error: for each function it appears in.)
drivers/extcon/extcon-class.c: In function 'extcon_class_exit':
drivers/extcon/extcon-class.c:825: warning: extra tokens at end of
#ifdef directive
make[2]: *** [drivers/extcon/extcon-class.o] Error 1
make[1]: *** [drivers/extcon] Error 2
make[1]: *** Waiting for unfinished jobs....

Thanks,
Chanwoo Choi



\
 
 \ /
  Last update: 2012-09-24 10:01    [W:0.033 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site