Skip to contentSkip to conversation

ALSA: hda - Add / fix kernel doc comments

PATCH New Takashi Iwai 1 participant 1 message Oct 28, 2015 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda - Add / fix kernel doc comments

Give some readable comment in kernel doc style for each exported function, as I promised in the previous meetings. While we're at it, fix the wrong comments, too.

---
 sound/hda/hdac_bus.c    | 14 ++++++++++
 sound/hda/hdac_device.c | 10 ++++---
 sound/hda/hdac_i915.c   | 70 +++++++++++++++++++++++++++++++++++++++++++++++++
 sound/hda/hdac_regmap.c | 10 +++++++
 sound/hda/hdac_stream.c |  3 ++-
 5 files changed, 102 insertions(+), 5 deletions(-)
sound/hda/hdac_bus.c +14 -0
index 27c447e4fe5c..0e81ea89a596 100644
@@ -172,6 +172,15 @@ static void process_unsol_events(struct work_struct *work)
 	}
 }
 
+/**
+ * snd_hdac_bus_add_device - Add a codec to bus
+ * @bus: HDA core bus
+ * @codec: HDA core device to add
+ *
+ * Adds the given codec to the list in the bus.  The caddr_tbl array
+ * and codec_powered bits are updated, as well.
+ * Returns zero if success, or a negative error code.
+ */
 int snd_hdac_bus_add_device(struct hdac_bus *bus, struct hdac_device *codec)
 {
 	if (bus->caddr_tbl[codec->addr]) {
@@ -188,6 +197,11 @@ int snd_hdac_bus_add_device(struct hdac_bus *bus, struct hdac_device *codec)
 }
 EXPORT_SYMBOL_GPL(snd_hdac_bus_add_device);
 
+/**
+ * snd_hdac_bus_remove_device - Remove a codec from bus
+ * @bus: HDA core bus
+ * @codec: HDA core device to remove
+ */
 void snd_hdac_bus_remove_device(struct hdac_bus *bus,
 				struct hdac_device *codec)
 {
sound/hda/hdac_device.c +6 -4
index bbdb25f5bbb9..e361024eabb6 100644
@@ -629,8 +629,10 @@ int snd_hdac_power_down_pm(struct hdac_device *codec)
 EXPORT_SYMBOL_GPL(snd_hdac_power_down_pm);
 #endif
 
-/*
- * Enable/disable the link power for a codec.
+/**
+ * snd_hdac_link_power - Enable/disable the link power for a codec
+ * @codec: the codec object
+ * @bool: enable or disable the link power
  */
 int snd_hdac_link_power(struct hdac_device *codec, bool enable)
 {
@@ -1048,8 +1050,8 @@ int snd_hdac_codec_write(struct hdac_device *hdac, hda_nid_t nid,
 }
 EXPORT_SYMBOL_GPL(snd_hdac_codec_write);
 
-/*
- * snd_hdac_check_power_state: check whether the actual power state matches
+/**
+ * snd_hdac_check_power_state - check whether the actual power state matches
  * with the target state
  *
  * @hdac: the HDAC device
sound/hda/hdac_i915.c +70 -0

106 lines not on this page · raw message

sound/hda/hdac_regmap.c +10 -0
index b0ed870ffb88..eb8f7c30cb09 100644
@@ -339,6 +339,12 @@ static const struct regmap_config hda_regmap_cfg = {
 	.use_single_rw = true,
 };
 
+/**
+ * snd_hdac_regmap_init - Initialize regmap for HDA register accesses
+ * @codec: the codec object
+ *
+ * Returns zero for success or a negative error code.
+ */
 int snd_hdac_regmap_init(struct hdac_device *codec)
 {
 	struct regmap *regmap;
@@ -352,6 +358,10 @@ int snd_hdac_regmap_init(struct hdac_device *codec)
 }
 EXPORT_SYMBOL_GPL(snd_hdac_regmap_init);
 
+/**
+ * snd_hdac_regmap_init - Release the regmap from HDA codec
+ * @codec: the codec object
+ */
 void snd_hdac_regmap_exit(struct hdac_device *codec)
 {
 	if (codec->regmap) {
sound/hda/hdac_stream.c +2 -1
index 8981159813ef..38990a77d7b7 100644
@@ -426,7 +426,8 @@ int snd_hdac_stream_setup_periods(struct hdac_stream *azx_dev)
 }
 EXPORT_SYMBOL_GPL(snd_hdac_stream_setup_periods);
 
-/* snd_hdac_stream_set_params - set stream parameters
+/**
+ * snd_hdac_stream_set_params - set stream parameters
  * @azx_dev: HD-audio core stream for which parameters are to be set
  * @format_val: format value parameter
  *
Signature · 1 line
2.6.2