/* * 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
Person | Tokens | Prop | Commits | CommitProp | |
lars-peter clausen | lars-peter clausen | 45 | 43.69% | 3 | 42.86% |
dimitris papastamos | dimitris papastamos | 28 | 27.18% | 1 | 14.29% |
mark brown | mark brown | 23 | 22.33% | 2 | 28.57% |
xiubo li | xiubo li | 7 | 6.80% | 1 | 14.29% |
Total | 103 | 100.00% | 7 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
lars-peter clausen | lars-peter clausen | 20 | 48.78% | 2 | 40.00% |
dimitris papastamos | dimitris papastamos | 16 | 39.02% | 2 | 40.00% |
mark brown | mark brown | 5 | 12.20% | 1 | 20.00% |
Total | 41 | 100.00% | 5 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
lars-peter clausen | lars-peter clausen | 68 | 43.87% | 3 | 27.27% |
dimitris papastamos | dimitris papastamos | 48 | 30.97% | 4 | 36.36% |
mark brown | mark brown | 32 | 20.65% | 3 | 27.27% |
xiubo li | xiubo li | 7 | 4.52% | 1 | 9.09% |
Total | 155 | 100.00% | 11 | 100.00% |