summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudheer Papothi <spapothi@codeaurora.org>2016-03-17 03:14:46 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:25:01 -0700
commit1a23d3a63ebe6a68d4209d9078c3afd6e67ec88d (patch)
treeb548346babfaf08a2a2b5104c1e0d12b5bbdfd5f
parentcb9c0e72ea0a0686958a26a1873b5e60446f431c (diff)
ASoC: wsa881x: Fix compilation warning on kernel 4.4
Fix compilation warning in wsa881x codec on kernel 4.4. Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
-rw-r--r--sound/soc/codecs/wsa881x-temp-sensor.c8
-rw-r--r--sound/soc/codecs/wsa881x-temp-sensor.h2
-rw-r--r--sound/soc/codecs/wsa881x.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/codecs/wsa881x-temp-sensor.c b/sound/soc/codecs/wsa881x-temp-sensor.c
index 67b5d4c85707..0079d0f6cd52 100644
--- a/sound/soc/codecs/wsa881x-temp-sensor.c
+++ b/sound/soc/codecs/wsa881x-temp-sensor.c
@@ -34,14 +34,14 @@
* Return: 0 on success or negative error code on failure.
*/
int wsa881x_get_temp(struct thermal_zone_device *thermal,
- unsigned long *temp)
+ int *temp)
{
struct wsa881x_tz_priv *pdata;
struct snd_soc_codec *codec;
struct wsa_temp_register reg;
int dmeas, d1, d2;
int ret = 0;
- long temp_val;
+ int temp_val;
int t1 = T1_TEMP;
int t2 = T2_TEMP;
@@ -98,13 +98,13 @@ int wsa881x_get_temp(struct thermal_zone_device *thermal,
if (temp_val <= LOW_TEMP_THRESHOLD ||
temp_val >= HIGH_TEMP_THRESHOLD) {
- printk_ratelimited("%s: T0: %ld is out of range[%d, %d]\n",
+ printk_ratelimited("%s: T0: %d is out of range[%d, %d]\n",
__func__, temp_val, LOW_TEMP_THRESHOLD,
HIGH_TEMP_THRESHOLD);
}
if (temp)
*temp = temp_val;
- pr_debug("%s: t0 measured: %ld dmeas = %d, d1 = %d, d2 = %d\n",
+ pr_debug("%s: t0 measured: %d dmeas = %d, d1 = %d, d2 = %d\n",
__func__, temp_val, dmeas, d1, d2);
return ret;
}
diff --git a/sound/soc/codecs/wsa881x-temp-sensor.h b/sound/soc/codecs/wsa881x-temp-sensor.h
index bc428cc791dc..d6c1eb75e940 100644
--- a/sound/soc/codecs/wsa881x-temp-sensor.h
+++ b/sound/soc/codecs/wsa881x-temp-sensor.h
@@ -33,7 +33,7 @@ struct wsa881x_tz_priv {
wsa_temp_register_read wsa_temp_reg_read;
};
-int wsa881x_get_temp(struct thermal_zone_device *tz_dev, unsigned long *temp);
+int wsa881x_get_temp(struct thermal_zone_device *tz_dev, int *temp);
int wsa881x_init_thermal(struct wsa881x_tz_priv *tz_pdata);
void wsa881x_deinit_thermal(struct thermal_zone_device *tz_dev);
#endif
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c
index 5ea27fa172ae..9ea702e5960f 100644
--- a/sound/soc/codecs/wsa881x.c
+++ b/sound/soc/codecs/wsa881x.c
@@ -757,14 +757,14 @@ static void wsa881x_ocp_ctl_work(struct work_struct *work)
struct wsa881x_priv *wsa881x;
struct delayed_work *dwork;
struct snd_soc_codec *codec;
- unsigned long temp_val;
+ int temp_val;
dwork = to_delayed_work(work);
wsa881x = container_of(dwork, struct wsa881x_priv, ocp_ctl_work);
codec = wsa881x->codec;
wsa881x_get_temp(wsa881x->tz_pdata.tz_dev, &temp_val);
- dev_dbg(codec->dev, " temp = %ld\n", temp_val);
+ dev_dbg(codec->dev, " temp = %d\n", temp_val);
if (temp_val <= WSA881X_OCP_CTL_TEMP_CELSIUS)
snd_soc_update_bits(codec, WSA881X_SPKR_OCP_CTL, 0xC0, 0x00);