cregit-Linux how code gets into the kernel

Release 4.13 sound/soc/soc-cache.c

Directory: sound/soc
/*
 * soc-cache.c  --  ASoC register cache helpers
 *
 * Copyright 2009 Wolfson Microelectronics PLC.
 *
 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
 *
 *  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->component.name); 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; }

Contributors

PersonTokensPropCommitsCommitProp
Lars-Peter Clausen4543.69%342.86%
Mark Brown3533.98%228.57%
Dimitris Papastamos1615.53%114.29%
Xiubo Li76.80%114.29%
Total103100.00%7100.00%

/* * 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->component.name); kfree(codec->reg_cache); codec->reg_cache = NULL; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Lars-Peter Clausen2048.78%250.00%
Dimitris Papastamos1639.02%125.00%
Mark Brown512.20%125.00%
Total41100.00%4100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Lars-Peter Clausen6843.87%330.00%
Mark Brown4428.39%330.00%
Dimitris Papastamos3623.23%330.00%
Xiubo Li74.52%110.00%
Total155100.00%10100.00%
Directory: sound/soc
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.