Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

power: supply: surface-battery: Make some symbols static

The sparse tool complains as follows:

drivers/power/supply/surface_battery.c:700:1: warning:
symbol 'dev_attr_alarm' was not declared. Should it be static?
drivers/power/supply/surface_battery.c:805:1: warning:
symbol 'surface_battery_pm_ops' was not declared. Should it be static?

This symbol is not used outside of surface_battery.c, so this
commit marks it static.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
Acked-by: Maximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

authored by

Qiheng Lin and committed by
Sebastian Reichel
5ea2edd6 e318c3c2

+2 -2
+2 -2
drivers/power/supply/surface_battery.c
··· 697 697 return count; 698 698 } 699 699 700 - DEVICE_ATTR_RW(alarm); 700 + static DEVICE_ATTR_RW(alarm); 701 701 702 702 static struct attribute *spwr_battery_attrs[] = { 703 703 &dev_attr_alarm.attr, ··· 802 802 { 803 803 return spwr_battery_recheck_full(dev_get_drvdata(dev)); 804 804 } 805 - SIMPLE_DEV_PM_OPS(surface_battery_pm_ops, NULL, surface_battery_resume); 805 + static SIMPLE_DEV_PM_OPS(surface_battery_pm_ops, NULL, surface_battery_resume); 806 806 807 807 static int surface_battery_probe(struct ssam_device *sdev) 808 808 {