Skip to content

Commit

Permalink
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/evalenti/linux-soc-thermal

Pull last minute thermal-SoC management fixes from Eduardo Valentin:
 "Specifics:

   - Minor fixes on ST and RCAR thermal drivers.
   - Avoid flooding kernel log when driver returns -EAGAIN.

  Note: I am sending this pull on Rui's behalf while he fixes issues in
  his Linux box"

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
  drivers: thermal: st: remove several sparse warnings
  thermal: constify of_device_id array
  thermal: Do not log an error if thermal_zone_get_temp returns -EAGAIN
  thermal: rcar: Fix typo in r8a73a4 SoC name
  • Loading branch information
Linus Torvalds committed Apr 12, 2015
2 parents 56fd85b + 541d529 commit 54d8ccc
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/thermal/rcar-thermal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Required properties:
- compatible : "renesas,thermal-<soctype>", "renesas,rcar-thermal"
as fallback.
Examples with soctypes are:
- "renesas,thermal-r8a73a4" (R-Mobile AP6)
- "renesas,thermal-r8a73a4" (R-Mobile APE6)
- "renesas,thermal-r8a7779" (R-Car H1)
- "renesas,thermal-r8a7790" (R-Car H2)
- "renesas,thermal-r8a7791" (R-Car M2-W)
Expand Down
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
10 changes: 5 additions & 5 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,27 +166,27 @@ 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,
.temp_adjust_val = -95,
.crit_temp = 120,
};

static struct of_device_id st_mmap_thermal_of_match[] = {
static const struct of_device_id st_mmap_thermal_of_match[] = {
{ .compatible = "st,stih416-mpe-thermal", .data = &st_416mpe_cdata },
{ .compatible = "st,stih407-thermal", .data = &st_407_cdata },
{ /* sentinel */ }
};
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
14 changes: 7 additions & 7 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 @@ -143,7 +143,7 @@ const struct st_thermal_compat_data st_127_cdata = {
.crit_temp = 120,
};

static struct of_device_id st_syscfg_thermal_of_match[] = {
static const struct of_device_id st_syscfg_thermal_of_match[] = {
{ .compatible = "st,stih415-sas-thermal", .data = &st_415sas_cdata },
{ .compatible = "st,stih415-mpe-thermal", .data = &st_415mpe_cdata },
{ .compatible = "st,stih416-sas-thermal", .data = &st_416sas_cdata },
Expand All @@ -152,12 +152,12 @@ static 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
6 changes: 4 additions & 2 deletions drivers/thermal/thermal_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,10 @@ static void update_temperature(struct thermal_zone_device *tz)

ret = thermal_zone_get_temp(tz, &temp);
if (ret) {
dev_warn(&tz->device, "failed to read out thermal zone %d\n",
tz->id);
if (ret != -EAGAIN)
dev_warn(&tz->device,
"failed to read out thermal zone (%d)\n",
ret);
return;
}

Expand Down

0 comments on commit 54d8ccc

Please sign in to comment.