Re: [PATCH 2/2] extcon: unregister compat link on cleanup

2012-09-24 Thread Chanwoo Choi
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: sta...@vger.kernel.org
> Signed-off-by: Peter Huewe 
> ---

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] extcon: unregister compat link on cleanup

2012-09-24 Thread Chanwoo Choi
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: sta...@vger.kernel.org
 Signed-off-by: Peter Huewe peterhu...@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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] extcon: unregister compat link on cleanup

2012-09-21 Thread Peter Huewe
Since extcon registers this compat link at device registration
(extcon_dev_register), we should probably remove them at deregistration/cleanup.

Cc: sta...@vger.kernel.org
Signed-off-by: Peter Huewe 
---
 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 */
device_unregister(edev->dev);
put_device(edev->dev);
}
-- 
1.7.8.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] extcon: unregister compat link on cleanup

2012-09-21 Thread Peter Huewe
Since extcon registers this compat link at device registration
(extcon_dev_register), we should probably remove them at deregistration/cleanup.

Cc: sta...@vger.kernel.org
Signed-off-by: Peter Huewe peterhu...@gmx.de
---
 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 */
device_unregister(edev-dev);
put_device(edev-dev);
}
-- 
1.7.8.6

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/