From 748e4f3d702def1a4bff191e0cf93b6a05340f01 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 10 May 2024 07:41:34 +0000
Subject: [PATCH] add gpio led uart

---
 kernel/include/sound/info.h |   68 ++++++++++++++++++++++------------
 1 files changed, 44 insertions(+), 24 deletions(-)

diff --git a/kernel/include/sound/info.h b/kernel/include/sound/info.h
index af58039..25af5d8 100644
--- a/kernel/include/sound/info.h
+++ b/kernel/include/sound/info.h
@@ -1,29 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 #ifndef __SOUND_INFO_H
 #define __SOUND_INFO_H
 
 /*
  *  Header file for info interface
  *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
- *
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- *
  */
 
 #include <linux/poll.h>
 #include <linux/seq_file.h>
+#include <linux/android_kabi.h>
 #include <sound/core.h>
 
 /* buffer for information */
@@ -70,6 +56,8 @@
 	int (*mmap)(struct snd_info_entry *entry, void *file_private_data,
 		    struct inode *inode, struct file *file,
 		    struct vm_area_struct *vma);
+
+	ANDROID_KABI_RESERVE(1);
 };
 
 struct snd_info_entry {
@@ -79,10 +67,9 @@
 	unsigned short content;
 	union {
 		struct snd_info_entry_text text;
-		struct snd_info_entry_ops *ops;
+		const struct snd_info_entry_ops *ops;
 	} c;
 	struct snd_info_entry *parent;
-	struct snd_card *card;
 	struct module *module;
 	void *private_data;
 	void (*private_free)(struct snd_info_entry *entry);
@@ -90,6 +77,8 @@
 	struct mutex access;
 	struct list_head children;
 	struct list_head list;
+
+	ANDROID_KABI_RESERVE(1);
 };
 
 #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_SND_PROC_FS)
@@ -160,10 +149,15 @@
 	entry->c.text.read = read;
 }
 
+int snd_card_rw_proc_new(struct snd_card *card, const char *name,
+			 void *private_data,
+			 void (*read)(struct snd_info_entry *,
+				      struct snd_info_buffer *),
+			 void (*write)(struct snd_info_entry *entry,
+				       struct snd_info_buffer *buffer));
+
 int snd_info_check_reserved_words(const char *str);
-struct snd_info_entry *snd_info_create_subdir(struct module *mod,
-					      const char *name,
-					      struct snd_info_entry *parent);
+
 #else
 
 #define snd_seq_root NULL
@@ -191,12 +185,38 @@
 static inline void snd_info_set_text_ops(struct snd_info_entry *entry __attribute__((unused)),
 					 void *private_data,
 					 void (*read)(struct snd_info_entry *, struct snd_info_buffer *)) {}
+static inline int snd_card_rw_proc_new(struct snd_card *card, const char *name,
+				       void *private_data,
+				       void (*read)(struct snd_info_entry *,
+						    struct snd_info_buffer *),
+				       void (*write)(struct snd_info_entry *entry,
+						     struct snd_info_buffer *buffer))
+{
+	return 0;
+}
 static inline int snd_info_check_reserved_words(const char *str) { return 1; }
-static inline struct snd_info_entry *snd_info_create_subdir(
-				struct module *mod, const char *name,
-				struct snd_info_entry *parent) { return NULL; }
+
 #endif
 
+/**
+ * snd_card_ro_proc_new - Create a read-only text proc file entry for the card
+ * @card: the card instance
+ * @name: the file name
+ * @private_data: the arbitrary private data
+ * @read: the read callback
+ *
+ * This proc file entry will be registered via snd_card_register() call, and
+ * it will be removed automatically at the card removal, too.
+ */
+static inline int
+snd_card_ro_proc_new(struct snd_card *card, const char *name,
+		     void *private_data,
+		     void (*read)(struct snd_info_entry *,
+				  struct snd_info_buffer *))
+{
+	return snd_card_rw_proc_new(card, name, private_data, read, NULL);
+}
+
 /*
  * OSS info part
  */

--
Gitblit v1.6.2