.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * rt1305.c -- RT1305 ALSA SoC amplifier component driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright 2018 Realtek Semiconductor Corp. |
---|
5 | 6 | * Author: Shuming Fan <shumingf@realtek.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify |
---|
8 | | - * it under the terms of the GNU General Public License version 2 as |
---|
9 | | - * published by the Free Software Foundation. |
---|
10 | 7 | */ |
---|
11 | 8 | |
---|
12 | 9 | #include <linux/module.h> |
---|
.. | .. |
---|
414 | 411 | struct rt1305_priv *rt1305 = snd_soc_component_get_drvdata(component); |
---|
415 | 412 | unsigned int val; |
---|
416 | 413 | |
---|
417 | | - snd_soc_component_read(component, RT1305_CLK_1, &val); |
---|
| 414 | + val = snd_soc_component_read(component, RT1305_CLK_1); |
---|
418 | 415 | |
---|
419 | 416 | if (rt1305->sysclk_src == RT1305_FS_SYS_PRE_S_PLL1 && |
---|
420 | 417 | (val & RT1305_SEL_PLL_SRC_2_RCCLK)) |
---|
.. | .. |
---|
611 | 608 | |
---|
612 | 609 | static int rt1305_get_clk_info(int sclk, int rate) |
---|
613 | 610 | { |
---|
614 | | - int i, pd[] = {1, 2, 3, 4, 6, 8, 12, 16}; |
---|
| 611 | + int i; |
---|
| 612 | + static const int pd[] = {1, 2, 3, 4, 6, 8, 12, 16}; |
---|
615 | 613 | |
---|
616 | 614 | if (sclk <= 0 || rate <= 0) |
---|
617 | 615 | return -EINVAL; |
---|
.. | .. |
---|
963 | 961 | .num_reg_defaults = ARRAY_SIZE(rt1305_reg), |
---|
964 | 962 | .ranges = rt1305_ranges, |
---|
965 | 963 | .num_ranges = ARRAY_SIZE(rt1305_ranges), |
---|
966 | | - .use_single_rw = true, |
---|
| 964 | + .use_single_read = true, |
---|
| 965 | + .use_single_write = true, |
---|
967 | 966 | }; |
---|
968 | 967 | |
---|
969 | 968 | #if defined(CONFIG_OF) |
---|