[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170711112914.GA4944@aakp-Lenovo-ideapad-500-15ISK>
Date: Tue, 11 Jul 2017 16:59:14 +0530
From: Karuna Grewal <karunagrewal98@...il.com>
To: linux-kernel@...r.kernel.org
Cc: gregkh@...uxfoundation.org, devel@...verdev.osuosl.org
Subject: [PATCH] staging: bcm2835-audio: remove more than 80 char error
remove the more than 80 character error as pointed out by checkpatch by
spliting the statements at the separators in the statements .
Signed-off-by: Karuna Grewal <karunagrewal98@...il.com>
---
.../vc04_services/bcm2835-audio/bcm2835-ctl.c | 53 ++++++++++++++--------
1 file changed, 35 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
index 30d310b..8277c6f 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
@@ -107,7 +107,7 @@ static int snd_bcm2835_ctl_get(struct snd_kcontrol *kcontrol,
}
static int snd_bcm2835_ctl_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
+ struct snd_ctl_elem_value *ucontrol)
{
struct bcm2835_chip *chip = snd_kcontrol_chip(kcontrol);
int changed = 0;
@@ -116,14 +116,19 @@ static int snd_bcm2835_ctl_put(struct snd_kcontrol *kcontrol,
return -EINTR;
if (kcontrol->private_value == PCM_PLAYBACK_VOLUME) {
- audio_info("Volume change attempted.. volume = %d new_volume = %d\n", chip->volume, (int)ucontrol->value.integer.value[0]);
+ audio_info(
+ "Volume change attempted.. volume = %d new_volume = %d\n",
+ chip->volume, (int)ucontrol->value.integer.value[0]);
if (chip->mute == CTRL_VOL_MUTE) {
- /* changed = toggle_mute(chip, CTRL_VOL_UNMUTE); */
- changed = 1; /* should return 0 to signify no change but the mixer takes this as the opposite sign (no idea why) */
+ /* changed = toggle_mute(chip, CTRL_VOL_UNMUTE);*/
+ /* should return 0*/
+ changed = 1; //mixers takes opposite sign that's why 1
goto unlock;
}
- if (changed || (ucontrol->value.integer.value[0] != chip2alsa(chip->volume))) {
- chip->volume = alsa2chip(ucontrol->value.integer.value[0]);
+ if (changed || (ucontrol->value.integer.value[0] != chip2alsa(
+ chip->volume))) {
+ chip->volume =
+ alsa2chip(ucontrol->value.integer.value[0]);
changed = 1;
}
@@ -154,7 +159,9 @@ static struct snd_kcontrol_new snd_bcm2835_ctl[] = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "PCM Playback Volume",
.index = 0,
- .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ,
+ .access =
+ SNDRV_CTL_ELEM_ACCESS_READWRITE |
+ SNDRV_CTL_ELEM_ACCESS_TLV_READ,
.private_value = PCM_PLAYBACK_VOLUME,
.info = snd_bcm2835_ctl_info,
.get = snd_bcm2835_ctl_get,
@@ -186,15 +193,17 @@ static struct snd_kcontrol_new snd_bcm2835_ctl[] = {
},
};
-static int snd_bcm2835_spdif_default_info(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_info *uinfo)
+static int snd_bcm2835_spdif_default_info(
+ struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
uinfo->count = 1;
return 0;
}
-static int snd_bcm2835_spdif_default_get(struct snd_kcontrol *kcontrol,
+static int snd_bcm2835_spdif_default_get(
+ struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct bcm2835_chip *chip = snd_kcontrol_chip(kcontrol);
@@ -211,7 +220,8 @@ static int snd_bcm2835_spdif_default_get(struct snd_kcontrol *kcontrol,
return 0;
}
-static int snd_bcm2835_spdif_default_put(struct snd_kcontrol *kcontrol,
+static int snd_bcm2835_spdif_default_put(
+ struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct bcm2835_chip *chip = snd_kcontrol_chip(kcontrol);
@@ -222,7 +232,8 @@ static int snd_bcm2835_spdif_default_put(struct snd_kcontrol *kcontrol,
return -EINTR;
for (i = 0; i < 4; i++)
- val |= (unsigned int)ucontrol->value.iec958.status[i] << (i * 8);
+ val |=
+ (unsigned int)ucontrol->value.iec958.status[i] << (i * 8);
change = val != chip->spdif_status;
chip->spdif_status = val;
@@ -231,7 +242,8 @@ static int snd_bcm2835_spdif_default_put(struct snd_kcontrol *kcontrol,
return change;
}
-static int snd_bcm2835_spdif_mask_info(struct snd_kcontrol *kcontrol,
+static int snd_bcm2835_spdif_mask_info(
+ struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
@@ -239,7 +251,8 @@ static int snd_bcm2835_spdif_mask_info(struct snd_kcontrol *kcontrol,
return 0;
}
-static int snd_bcm2835_spdif_mask_get(struct snd_kcontrol *kcontrol,
+static int snd_bcm2835_spdif_mask_get(
+ struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
/*
@@ -250,7 +263,8 @@ static int snd_bcm2835_spdif_mask_get(struct snd_kcontrol *kcontrol,
return 0;
}
-static int snd_bcm2835_spdif_stream_info(struct snd_kcontrol *kcontrol,
+static int snd_bcm2835_spdif_stream_info(
+ struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
@@ -258,7 +272,8 @@ static int snd_bcm2835_spdif_stream_info(struct snd_kcontrol *kcontrol,
return 0;
}
-static int snd_bcm2835_spdif_stream_get(struct snd_kcontrol *kcontrol,
+static int snd_bcm2835_spdif_stream_get(
+ struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct bcm2835_chip *chip = snd_kcontrol_chip(kcontrol);
@@ -275,7 +290,8 @@ static int snd_bcm2835_spdif_stream_get(struct snd_kcontrol *kcontrol,
return 0;
}
-static int snd_bcm2835_spdif_stream_put(struct snd_kcontrol *kcontrol,
+static int snd_bcm2835_spdif_stream_put(
+ struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct bcm2835_chip *chip = snd_kcontrol_chip(kcontrol);
@@ -286,7 +302,8 @@ static int snd_bcm2835_spdif_stream_put(struct snd_kcontrol *kcontrol,
return -EINTR;
for (i = 0; i < 4; i++)
- val |= (unsigned int)ucontrol->value.iec958.status[i] << (i * 8);
+ val |=
+ (unsigned int)ucontrol->value.iec958.status[i] << (i * 8);
change = val != chip->spdif_status;
chip->spdif_status = val;
--
2.7.4
Powered by blists - more mailing lists