cregit-Linux how code gets into the kernel

Release 4.7 sound/soc/soc-cache.c

Directory: sound/soc
 * soc-cache.c  --  ASoC register cache helpers
 * Copyright 2009 Wolfson Microelectronics PLC.
 * Author: Mark Brown <>
 *  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.

#include <sound/soc.h>
#include <linux/export.h>
#include <linux/slab.h>

int snd_soc_cache_init(struct snd_soc_codec *codec) { const struct snd_soc_codec_driver *codec_drv = codec->driver; size_t reg_size; reg_size = codec_drv->reg_cache_size * codec_drv->reg_word_size; if (!reg_size) return 0; dev_dbg(codec->dev, "ASoC: Initializing cache for %s codec\n", codec->; if (codec_drv->reg_cache_default) codec->reg_cache = kmemdup(codec_drv->reg_cache_default, reg_size, GFP_KERNEL); else codec->reg_cache = kzalloc(reg_size, GFP_KERNEL); if (!codec->reg_cache) return -ENOMEM; return 0; }


lars-peter clausenlars-peter clausen4543.69%342.86%
dimitris papastamosdimitris papastamos2827.18%114.29%
mark brownmark brown2322.33%228.57%
xiubo lixiubo li76.80%114.29%

/* * NOTE: keep in mind that this function might be called * multiple times. */
int snd_soc_cache_exit(struct snd_soc_codec *codec) { dev_dbg(codec->dev, "ASoC: Destroying cache for %s codec\n", codec->; kfree(codec->reg_cache); codec->reg_cache = NULL; return 0; }


lars-peter clausenlars-peter clausen2048.78%240.00%
dimitris papastamosdimitris papastamos1639.02%240.00%
mark brownmark brown512.20%120.00%

Overall Contributors

lars-peter clausenlars-peter clausen6843.87%327.27%
dimitris papastamosdimitris papastamos4830.97%436.36%
mark brownmark brown3220.65%327.27%
xiubo lixiubo li74.52%19.09%
Directory: sound/soc
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
{% endraw %}