Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
bca14657
Commit
bca14657
authored
Jul 18, 2009
by
Mark Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ASoC: Fix checkpatch issues in AD1938
Signed-off-by:
Mark Brown
<
broonie@opensource.wolfsonmicro.com
>
parent
0c11f655
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
78 deletions
+78
-78
sound/soc/codecs/ad1938.c
sound/soc/codecs/ad1938.c
+78
-78
No files found.
sound/soc/codecs/ad1938.c
View file @
bca14657
...
...
@@ -45,7 +45,6 @@
struct
ad1938_priv
{
struct
snd_soc_codec
codec
;
u8
reg_cache
[
AD1938_NUM_REGS
];
};
static
struct
snd_soc_codec
*
ad1938_codec
;
...
...
@@ -136,7 +135,7 @@ static int ad1938_set_tdm_slot(struct snd_soc_dai *dai,
dac_reg
&=
~
AD1938_DAC_CHAN_MASK
;
adc_reg
&=
~
AD1938_ADC_CHAN_MASK
;
switch
(
slots
)
{
switch
(
slots
)
{
case
2
:
dac_reg
|=
AD1938_DAC_2_CHANNELS
<<
AD1938_DAC_CHAN_SHFT
;
adc_reg
|=
AD1938_ADC_2_CHANNELS
<<
AD1938_ADC_CHAN_SHFT
;
...
...
@@ -324,7 +323,7 @@ static int ad1938_write_reg(struct snd_soc_codec *codec, unsigned int reg,
u8
*
reg_cache
=
codec
->
reg_cache
;
int
ret
=
0
;
if
(
value
!=
reg_cache
[
reg
])
{
if
(
value
!=
reg_cache
[
reg
])
{
uint8_t
buf
[
AD1938_SPI_BUFLEN
];
struct
spi_transfer
t
=
{
.
tx_buf
=
buf
,
...
...
@@ -337,7 +336,8 @@ static int ad1938_write_reg(struct snd_soc_codec *codec, unsigned int reg,
buf
[
2
]
=
value
;
spi_message_init
(
&
m
);
spi_message_add_tail
(
&
t
,
&
m
);
if
((
ret
=
spi_sync
(
codec
->
control_data
,
&
m
))
==
0
)
ret
=
spi_sync
(
codec
->
control_data
,
&
m
);
if
(
ret
==
0
)
reg_cache
[
reg
]
=
value
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment