power: axp288_charger: Fix broken extcon API calls
PATCH 1/1 power: axp288_charger: Fix broken extcon API calls
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 <[email protected]>
Cc Ramakrishna Pallala <[email protected]>
Signed-off-by Guenter Roeck <[email protected]>
--- drivers/power/axp288_charger.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/power/axp288_charger.c +6 -3
@@ -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 ;
Signature · 1 line
2.1.0
Hi Guenter,
The similar patch[1] was already merged.
Thanks,
Chanwoo Choi
Quoted 52 lines · Guenter Roeck
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 supportedexternal connectors without 'enum extcon' type")
Fixes 046050f6e623 ("extcon: Update the prototype of
extcon_register_notifier()with enum extcon")Cc Chanwoo Choi <[email protected]>Cc Ramakrishna Pallala <[email protected]>Signed-off-by Guenter Roeck <[email protected]>--- drivers/power/axp288_charger.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)drivers/power/axp288_charger.c +6
-3@@ -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 ;