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>
This commit is contained in:
Sudheer Papothi 2016-03-17 03:14:46 +05:30 committed by David Keitel
parent cb9c0e72ea
commit 1a23d3a63e
3 changed files with 7 additions and 7 deletions

View file

@ -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;
}

View file

@ -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

View file

@ -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);