Skip to content

Commit

Permalink
drivers: thermal: st: remove several sparse warnings
Browse files Browse the repository at this point in the history
Simple patch to make symbols static. Symbols that are not
shared with other parts of the kernel can be made static.
This change also removes several sparse complains.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ajit Pal Singh <ajitpal.singh@st.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
  • Loading branch information
Eduardo Valentin committed Apr 7, 2015
1 parent d877a62 commit 541d529
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion drivers/thermal/st/st_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Function to allocate regfields which are common
* between syscfg and memory mapped based sensors
*/
int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor)
static int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor)
{
struct device *dev = sensor->dev;
struct regmap *regmap = sensor->regmap;
Expand Down
8 changes: 4 additions & 4 deletions drivers/thermal/st/st_thermal_memmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static const struct st_thermal_sensor_ops st_mmap_sensor_ops = {
};

/* Compatible device data stih416 mpe thermal sensor */
const struct st_thermal_compat_data st_416mpe_cdata = {
static const struct st_thermal_compat_data st_416mpe_cdata = {
.reg_fields = st_mmap_thermal_regfields,
.ops = &st_mmap_sensor_ops,
.calibration_val = 14,
Expand All @@ -166,7 +166,7 @@ const struct st_thermal_compat_data st_416mpe_cdata = {
};

/* Compatible device data stih407 thermal sensor */
const struct st_thermal_compat_data st_407_cdata = {
static const struct st_thermal_compat_data st_407_cdata = {
.reg_fields = st_mmap_thermal_regfields,
.ops = &st_mmap_sensor_ops,
.calibration_val = 16,
Expand All @@ -181,12 +181,12 @@ static const struct of_device_id st_mmap_thermal_of_match[] = {
};
MODULE_DEVICE_TABLE(of, st_mmap_thermal_of_match);

int st_mmap_probe(struct platform_device *pdev)
static int st_mmap_probe(struct platform_device *pdev)
{
return st_thermal_register(pdev, st_mmap_thermal_of_match);
}

int st_mmap_remove(struct platform_device *pdev)
static int st_mmap_remove(struct platform_device *pdev)
{
return st_thermal_unregister(pdev);
}
Expand Down
12 changes: 6 additions & 6 deletions drivers/thermal/st/st_thermal_syscfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static const struct st_thermal_sensor_ops st_syscfg_sensor_ops = {
};

/* Compatible device data for stih415 sas thermal sensor */
const struct st_thermal_compat_data st_415sas_cdata = {
static const struct st_thermal_compat_data st_415sas_cdata = {
.sys_compat = "st,stih415-front-syscfg",
.reg_fields = st_415sas_regfields,
.ops = &st_syscfg_sensor_ops,
Expand All @@ -114,7 +114,7 @@ const struct st_thermal_compat_data st_415sas_cdata = {
};

/* Compatible device data for stih415 mpe thermal sensor */
const struct st_thermal_compat_data st_415mpe_cdata = {
static const struct st_thermal_compat_data st_415mpe_cdata = {
.sys_compat = "st,stih415-system-syscfg",
.reg_fields = st_415mpe_regfields,
.ops = &st_syscfg_sensor_ops,
Expand All @@ -124,7 +124,7 @@ const struct st_thermal_compat_data st_415mpe_cdata = {
};

/* Compatible device data for stih416 sas thermal sensor */
const struct st_thermal_compat_data st_416sas_cdata = {
static const struct st_thermal_compat_data st_416sas_cdata = {
.sys_compat = "st,stih416-front-syscfg",
.reg_fields = st_416sas_regfields,
.ops = &st_syscfg_sensor_ops,
Expand All @@ -134,7 +134,7 @@ const struct st_thermal_compat_data st_416sas_cdata = {
};

/* Compatible device data for stid127 thermal sensor */
const struct st_thermal_compat_data st_127_cdata = {
static const struct st_thermal_compat_data st_127_cdata = {
.sys_compat = "st,stid127-cpu-syscfg",
.reg_fields = st_127_regfields,
.ops = &st_syscfg_sensor_ops,
Expand All @@ -152,12 +152,12 @@ static const struct of_device_id st_syscfg_thermal_of_match[] = {
};
MODULE_DEVICE_TABLE(of, st_syscfg_thermal_of_match);

int st_syscfg_probe(struct platform_device *pdev)
static int st_syscfg_probe(struct platform_device *pdev)
{
return st_thermal_register(pdev, st_syscfg_thermal_of_match);
}

int st_syscfg_remove(struct platform_device *pdev)
static int st_syscfg_remove(struct platform_device *pdev)
{
return st_thermal_unregister(pdev);
}
Expand Down

0 comments on commit 541d529

Please sign in to comment.