public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] power: axp288_charger: Fix broken extcon API calls
@ 2015-06-27  1:12 Guenter Roeck
  2015-06-29  1:49 ` Chanwoo Choi
  0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2015-06-27  1:12 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Dmitry Eremin-Solenikov, David Woodhouse, linux-pm, linux-kernel,
	Guenter Roeck, Chanwoo Choi, Ramakrishna Pallala

The extcon API calls have been changed to add an additional argument.
This causes build errors such as

drivers/power/axp288_charger.c:851:2: error:
	too few arguments to function 'extcon_register_notifier'

Fixes: 73b6ecdb93e8 ("extcon: Redefine the unique id of supported
	external connectors without 'enum extcon' type")
Fixes: 046050f6e623 ("extcon: Update the prototype of
	extcon_register_notifier() with enum extcon")
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/power/axp288_charger.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/power/axp288_charger.c b/drivers/power/axp288_charger.c
index 5680317f4823..0aa6e7fd25d4 100644
--- a/drivers/power/axp288_charger.c
+++ b/drivers/power/axp288_charger.c
@@ -848,7 +848,8 @@ static int axp288_charger_probe(struct platform_device *pdev)
 	/* Register for extcon notification */
 	INIT_WORK(&info->cable.work, axp288_charger_extcon_evt_worker);
 	info->cable.nb.notifier_call = axp288_charger_handle_cable_evt;
-	ret = extcon_register_notifier(info->cable.edev, &info->cable.nb);
+	ret = extcon_register_notifier(info->cable.edev, EXTCON_NONE,
+				       &info->cable.nb);
 	if (ret) {
 		dev_err(&info->pdev->dev,
 			"failed to register extcon notifier %d\n", ret);
@@ -909,7 +910,8 @@ intr_reg_failed:
 		extcon_unregister_interest(&info->otg.cable);
 	power_supply_unregister(info->psy_usb);
 psy_reg_failed:
-	extcon_unregister_notifier(info->cable.edev, &info->cable.nb);
+	extcon_unregister_notifier(info->cable.edev, EXTCON_NONE,
+				   &info->cable.nb);
 	return ret;
 }
 
@@ -920,7 +922,8 @@ static int axp288_charger_remove(struct platform_device *pdev)
 	if (info->otg.cable.edev)
 		extcon_unregister_interest(&info->otg.cable);
 
-	extcon_unregister_notifier(info->cable.edev, &info->cable.nb);
+	extcon_unregister_notifier(info->cable.edev, EXTCON_NONE,
+				   &info->cable.nb);
 	power_supply_unregister(info->psy_usb);
 
 	return 0;
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] power: axp288_charger: Fix broken extcon API calls
  2015-06-27  1:12 [PATCH] power: axp288_charger: Fix broken extcon API calls Guenter Roeck
@ 2015-06-29  1:49 ` Chanwoo Choi
  0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2015-06-29  1:49 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
	linux-pm, linux-kernel, Ramakrishna Pallala

Hi Guenter,

The similar patch[1] was already merged.

[1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4b703b1d4c46ca4a00109ca1a391943ec21991b3

Thanks,
Chanwoo Choi

On 06/27/2015 10:12 AM, Guenter Roeck wrote:
> The extcon API calls have been changed to add an additional argument.
> This causes build errors such as
> 
> drivers/power/axp288_charger.c:851:2: error:
> 	too few arguments to function 'extcon_register_notifier'
> 
> Fixes: 73b6ecdb93e8 ("extcon: Redefine the unique id of supported
> 	external connectors without 'enum extcon' type")
> Fixes: 046050f6e623 ("extcon: Update the prototype of
> 	extcon_register_notifier() with enum extcon")
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Cc: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  drivers/power/axp288_charger.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/power/axp288_charger.c b/drivers/power/axp288_charger.c
> index 5680317f4823..0aa6e7fd25d4 100644
> --- a/drivers/power/axp288_charger.c
> +++ b/drivers/power/axp288_charger.c
> @@ -848,7 +848,8 @@ static int axp288_charger_probe(struct platform_device *pdev)
>  	/* Register for extcon notification */
>  	INIT_WORK(&info->cable.work, axp288_charger_extcon_evt_worker);
>  	info->cable.nb.notifier_call = axp288_charger_handle_cable_evt;
> -	ret = extcon_register_notifier(info->cable.edev, &info->cable.nb);
> +	ret = extcon_register_notifier(info->cable.edev, EXTCON_NONE,
> +				       &info->cable.nb);
>  	if (ret) {
>  		dev_err(&info->pdev->dev,
>  			"failed to register extcon notifier %d\n", ret);
> @@ -909,7 +910,8 @@ intr_reg_failed:
>  		extcon_unregister_interest(&info->otg.cable);
>  	power_supply_unregister(info->psy_usb);
>  psy_reg_failed:
> -	extcon_unregister_notifier(info->cable.edev, &info->cable.nb);
> +	extcon_unregister_notifier(info->cable.edev, EXTCON_NONE,
> +				   &info->cable.nb);
>  	return ret;
>  }
>  
> @@ -920,7 +922,8 @@ static int axp288_charger_remove(struct platform_device *pdev)
>  	if (info->otg.cable.edev)
>  		extcon_unregister_interest(&info->otg.cable);
>  
> -	extcon_unregister_notifier(info->cable.edev, &info->cable.nb);
> +	extcon_unregister_notifier(info->cable.edev, EXTCON_NONE,
> +				   &info->cable.nb);
>  	power_supply_unregister(info->psy_usb);
>  
>  	return 0;
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-29  1:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-27  1:12 [PATCH] power: axp288_charger: Fix broken extcon API calls Guenter Roeck
2015-06-29  1:49 ` Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox