diff mbox

power: supply: twl4030-charger: make twl4030_bci_property_is_writeable static

Message ID 20170503103357.22598-1-colin.king@canonical.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Colin King May 3, 2017, 10:33 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The function twl4030_bci_property_is_writeable can be made static
as it does not need to be in global scope.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/power/supply/twl4030_charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

H. Nikolaus Schaller May 3, 2017, 12:25 p.m. UTC | #1
Hi Colin,

> Am 03.05.2017 um 12:33 schrieb Colin King <colin.king@canonical.com>:
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> The function twl4030_bci_property_is_writeable can be made static
> as it does not need to be in global scope.

Indeed. Have tested and it still works.

> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/power/supply/twl4030_charger.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charger.c
> index abd10f6861ae..2f82d0e9ec1b 100644
> --- a/drivers/power/supply/twl4030_charger.c
> +++ b/drivers/power/supply/twl4030_charger.c
> @@ -943,7 +943,7 @@ static int twl4030_bci_set_property(struct power_supply *psy,
> 	return 0;
> }
> 
> -int twl4030_bci_property_is_writeable(struct power_supply *psy,
> +static int twl4030_bci_property_is_writeable(struct power_supply *psy,
> 				      enum power_supply_property psp)
> {
> 	switch (psp) {
> -- 
> 2.11.0
> 

Thanks and BR,
Nikolaus
Sebastian Reichel May 4, 2017, 3:22 p.m. UTC | #2
Hi,

On Wed, May 03, 2017 at 11:33:57AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The function twl4030_bci_property_is_writeable can be made static
> as it does not need to be in global scope.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thanks, queued.

-- Sebastian
diff mbox

Patch

diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charger.c
index abd10f6861ae..2f82d0e9ec1b 100644
--- a/drivers/power/supply/twl4030_charger.c
+++ b/drivers/power/supply/twl4030_charger.c
@@ -943,7 +943,7 @@  static int twl4030_bci_set_property(struct power_supply *psy,
 	return 0;
 }
 
-int twl4030_bci_property_is_writeable(struct power_supply *psy,
+static int twl4030_bci_property_is_writeable(struct power_supply *psy,
 				      enum power_supply_property psp)
 {
 	switch (psp) {