All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Simonov <nicksimonovv@gmail.com>
To: oleksandr_andrushchenko@epam.com
Cc: xen-devel@lists.xenproject.org, alsa-devel@alsa-project.org,
	tiwai@suse.com, inux-kernel@vger.kernel.org,
	nicksimonovv@gmail.com
Subject: [PATCH v2] ALSA: xen-front: Refine indentations and constify snd_pcm_ops
Date: Fri, 21 Sep 2018 08:47:38 +0300	[thread overview]
Message-ID: <20180921054514.GA11771@nick> (raw)

snd_pcm_ops are not supposed to change. So mark the
non-const structs as const. Also, refine indentation
to increase readability.

Signed-off-by: Nick Simonov <nicksimonovv@gmail.com>
---
Changes v2:
- Fix typo in commit description, ncrease to increase.

 sound/xen/xen_snd_front_alsa.c | 46 +++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/sound/xen/xen_snd_front_alsa.c b/sound/xen/xen_snd_front_alsa.c
index 129180e..2cbd967 100644
--- a/sound/xen/xen_snd_front_alsa.c
+++ b/sound/xen/xen_snd_front_alsa.c
@@ -637,31 +637,31 @@ static int alsa_pb_fill_silence(struct snd_pcm_substream *substream,
  * to know when the buffer can be transferred to the backend.
  */
 
-static struct snd_pcm_ops snd_drv_alsa_playback_ops = {
-	.open = alsa_open,
-	.close = alsa_close,
-	.ioctl = snd_pcm_lib_ioctl,
-	.hw_params = alsa_hw_params,
-	.hw_free = alsa_hw_free,
-	.prepare = alsa_prepare,
-	.trigger = alsa_trigger,
-	.pointer = alsa_pointer,
-	.copy_user = alsa_pb_copy_user,
-	.copy_kernel = alsa_pb_copy_kernel,
-	.fill_silence = alsa_pb_fill_silence,
+static const struct snd_pcm_ops snd_drv_alsa_playback_ops = {
+	.open		= alsa_open,
+	.close		= alsa_close,
+	.ioctl		= snd_pcm_lib_ioctl,
+	.hw_params	= alsa_hw_params,
+	.hw_free	= alsa_hw_free,
+	.prepare	= alsa_prepare,
+	.trigger	= alsa_trigger,
+	.pointer	= alsa_pointer,
+	.copy_user	= alsa_pb_copy_user,
+	.copy_kernel	= alsa_pb_copy_kernel,
+	.fill_silence	= alsa_pb_fill_silence,
 };
 
-static struct snd_pcm_ops snd_drv_alsa_capture_ops = {
-	.open = alsa_open,
-	.close = alsa_close,
-	.ioctl = snd_pcm_lib_ioctl,
-	.hw_params = alsa_hw_params,
-	.hw_free = alsa_hw_free,
-	.prepare = alsa_prepare,
-	.trigger = alsa_trigger,
-	.pointer = alsa_pointer,
-	.copy_user = alsa_cap_copy_user,
-	.copy_kernel = alsa_cap_copy_kernel,
+static const struct snd_pcm_ops snd_drv_alsa_capture_ops = {
+	.open		= alsa_open,
+	.close		= alsa_close,
+	.ioctl		= snd_pcm_lib_ioctl,
+	.hw_params	= alsa_hw_params,
+	.hw_free	= alsa_hw_free,
+	.prepare	= alsa_prepare,
+	.trigger	= alsa_trigger,
+	.pointer	= alsa_pointer,
+	.copy_user	= alsa_cap_copy_user,
+	.copy_kernel	= alsa_cap_copy_kernel,
 };
 
 static int new_pcm_instance(struct xen_snd_front_card_info *card_info,
-- 
2.7.4

             reply	other threads:[~2018-09-21  6:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21  5:47 Nick Simonov [this message]
2018-09-21  6:51 ` [PATCH v2] ALSA: xen-front: Refine indentations and constify snd_pcm_ops Takashi Iwai
2018-09-21  6:51 ` [PATCH v2] ALSA: xen-front: Refine indentations and constify snd_pcm_ops, " Takashi Iwai
2018-09-21  6:51   ` Takashi Iwai
2018-09-21  9:21   ` Nick Simonov
2018-09-21  9:23     ` Takashi Iwai
2018-09-21  9:23     ` Takashi Iwai
2018-09-21  9:23       ` Takashi Iwai
2018-09-21  9:21   ` Nick Simonov
2018-09-21  5:47 Nick Simonov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180921054514.GA11771@nick \
    --to=nicksimonovv@gmail.com \
    --cc=20180919214710.GA6907@nick.alsa-project.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=inux-kernel@vger.kernel.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=tiwai@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.