public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Peter Huewe <peterhuewe@gmx.de>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Greg KH <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 2/2] extcon: unregister compat link on cleanup
Date: Mon, 24 Sep 2012 16:24:16 +0900	[thread overview]
Message-ID: <50600AA0.3080907@samsung.com> (raw)
In-Reply-To: <1348278070-22202-2-git-send-email-peterhuewe@gmx.de>

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


  reply	other threads:[~2012-09-24  7:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-22  1:41 [PATCH 1/2] extcon: Unregister compat class at module unload to fix oops Peter Huewe
2012-09-22  1:41 ` [PATCH 2/2] extcon: unregister compat link on cleanup Peter Huewe
2012-09-24  7:24   ` Chanwoo Choi [this message]
2012-09-24  7:24 ` [PATCH 1/2] extcon: Unregister compat class at module unload to fix oops Chanwoo Choi

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=50600AA0.3080907@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=peterhuewe@gmx.de \
    --cc=stable@vger.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