参照元

説明

引数

返り値

参考

実装

static int snd_soc_component_update_bits_legacy(
        struct snd_soc_component *component, unsigned int reg,
        unsigned int mask, unsigned int val, bool *change)
{
        unsigned int old, new;
        int ret;

        if (!component->read || !component->write)
                return -EIO;

        mutex_lock(&component->io_mutex);
        ret = component->read(component, reg, &old);
        if (ret < 0)
                goto out_unlock;

        new = (old & ~mask) | (val & mask);
        *change = old != new;
        if (*change)
                ret = component->write(component, reg, new);
out_unlock:
        mutex_unlock(&component->io_mutex);
        return ret;
}

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2016-06-08 (水) 16:31:37