Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1713748 > unrolled thread

[PATCH 03/15] ALSA: opl3sa2: constify pnp_device_id and pnp_card_device_id

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-17 12:10 +0200
Last post2017-08-17 12:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 03/15] ALSA: opl3sa2: constify pnp_device_id and pnp_card_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 12:10 +0200

#1713748 — [PATCH 03/15] ALSA: opl3sa2: constify pnp_device_id and pnp_card_device_id

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-17 12:10 +0200
Subject[PATCH 03/15] ALSA: opl3sa2: constify pnp_device_id and pnp_card_device_id
Message-ID<ufpUt-3mI-1@gated-at.bofh.it>
*_device_id are not supposed to change at runtime. All functions
working with *_device_id provided by <linux/pnp.h> work with
const *_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 sound/isa/opl3sa2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index 4098e3e0..7cce4cd 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -141,7 +141,7 @@ struct snd_opl3sa2 {
 
 #ifdef CONFIG_PNP
 
-static struct pnp_device_id snd_opl3sa2_pnpbiosids[] = {
+static const struct pnp_device_id snd_opl3sa2_pnpbiosids[] = {
 	{ .id = "YMH0021" },
 	{ .id = "NMX2210" },	/* Gateway Solo 2500 */
 	{ .id = "" }		/* end */
@@ -149,7 +149,7 @@ static struct pnp_device_id snd_opl3sa2_pnpbiosids[] = {
 
 MODULE_DEVICE_TABLE(pnp, snd_opl3sa2_pnpbiosids);
 
-static struct pnp_card_device_id snd_opl3sa2_pnpids[] = {
+static const struct pnp_card_device_id snd_opl3sa2_pnpids[] = {
 	/* Yamaha YMF719E-S (Genius Sound Maker 3DX) */
 	{ .id = "YMH0020", .devs = { { "YMH0021" } } },
 	/* Yamaha OPL3-SA3 (integrated on Intel's Pentium II AL440LX motherboard) */
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web