Power: charger-manager: Fixed coding style
PATCH 1/1 Power: charger-manager: Fixed coding style
Removed apaces before semicolon and fixed brackets on if statements
Signed-off-by Jesper Falk <[email protected]>
--- drivers/power/charger-manager.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
drivers/power/charger-manager.c +8 -11
@@ -327,7 +327,7 @@ static int try_charger_enable(struct charger_manager *cm, bool enable) cm->charging_start_time =ktime_to_ms (ktime_get ()); cm->charging_end_time =0 ; -for (i =0 ; i < desc->num_charger_regulators ; i++) { +for (i =0 ; i < desc->num_charger_regulators; i++) {if (desc->charger_regulators[i].externally_control)continue ;
@@ -345,7 +345,7 @@ static int try_charger_enable(struct charger_manager *cm, bool enable) cm->charging_start_time =0 ; cm->charging_end_time =ktime_to_ms (ktime_get ()); -for (i =0 ; i < desc->num_charger_regulators ; i++) { +for (i =0 ; i < desc->num_charger_regulators; i++) {if (desc->charger_regulators[i].externally_control)continue ;
@@ -1476,20 +1476,17 @@ static int charger_manager_probe(struct platform_device *pdev)* The following two do not need to be errors. * Users may intentionally ignore those two features. */ -if (desc->fullbatt_uV ==0 ) { +if (desc->fullbatt_uV ==0 )dev_info (&pdev->dev,"Ignoring full-battery voltage threshold as it is not supplied\n" ); - }if (!desc->fullbatt_vchkdrop_ms || !desc->fullbatt_vchkdrop_uV) {dev_info (&pdev->dev,"Disabling full-battery voltage drop checking mechanism as it is not supplied\n" ); desc->fullbatt_vchkdrop_ms =0 ; desc->fullbatt_vchkdrop_uV =0 ; } -if (desc->fullbatt_soc ==0 ) { +if (desc->fullbatt_soc ==0 )dev_info (&pdev->dev,"Ignoring full-battery soc(state of charge) threshold as it is not supplied\n" ); - } -if (desc->fullbatt_full_capacity ==0 ) { +if (desc->fullbatt_full_capacity ==0 )dev_info (&pdev->dev,"Ignoring full-battery full capacity threshold as it is not supplied\n" ); - }if (!desc->charger_regulators || desc->num_charger_regulators <1 ) {dev_err (&pdev->dev,"charger_regulators undefined\n" );
@@ -1676,16 +1673,16 @@ static int charger_manager_remove(struct platform_device *pdev)cancel_work_sync (&setup_polling);cancel_delayed_work_sync (&cm_monitor_work); -for (i =0 ; i < desc->num_charger_regulators ; i++) { +for (i =0 ; i < desc->num_charger_regulators; i++) {struct charger_regulator *charger = &desc->charger_regulators[i]; -for (j =0 ; j < charger->num_cables ; j++) { +for (j =0 ; j < charger->num_cables; j++) {struct charger_cable *cable = &charger->cables[j];extcon_unregister_interest (&cable->extcon_dev); } } -for (i =0 ; i < desc->num_charger_regulators ; i++) +for (i =0 ; i < desc->num_charger_regulators; i++)regulator_put (desc->charger_regulators[i].consumer);power_supply_unregister (&cm->charger_psy);
Signature · 1 line
1.8.5.2
Quoted 7 lines · Jesper Falk
Removed apaces before semicolon and fixed brackets on if statements
Signed-off-by Jesper Falk <[email protected]>--- drivers/power/charger-manager.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
Acked-by Chanwoo Choi
I reviewed and tested this patch.
Thanks,
Chanwoo Choi
Chanwoo Choi
Acked-byQuoted 9 lines · Chanwoo Choi
Quoted 7 lines · Jesper Falk
Removed apaces before semicolon and fixed brackets on if statements
Signed-off-by Jesper Falk <[email protected]>--- drivers/power/charger-manager.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
Quoted 7 lines
Acked-by Chanwoo ChoiI reviewed and tested this patch.
Thanks,
Chanwoo Choi
Sorry, I am missing email address.
Acked-by Chanwoo Choi <[email protected]>
Thanks,
Chanwoo Choi