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
nexedi
linux
Commits
7136b605
Commit
7136b605
authored
Dec 10, 2012
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/wm9081' into asoc-next
parents
de7a8a88
a5710c01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
16 deletions
+6
-16
sound/soc/codecs/wm9081.c
sound/soc/codecs/wm9081.c
+6
-16
No files found.
sound/soc/codecs/wm9081.c
View file @
7136b605
...
...
@@ -1341,28 +1341,27 @@ static __devinit int wm9081_i2c_probe(struct i2c_client *i2c,
i2c_set_clientdata
(
i2c
,
wm9081
);
wm9081
->
regmap
=
regmap_init_i2c
(
i2c
,
&
wm9081_regmap
);
wm9081
->
regmap
=
devm_
regmap_init_i2c
(
i2c
,
&
wm9081_regmap
);
if
(
IS_ERR
(
wm9081
->
regmap
))
{
ret
=
PTR_ERR
(
wm9081
->
regmap
);
dev_err
(
&
i2c
->
dev
,
"regmap_init() failed: %d
\n
"
,
ret
);
goto
err
;
return
ret
;
}
ret
=
regmap_read
(
wm9081
->
regmap
,
WM9081_SOFTWARE_RESET
,
&
reg
);
if
(
ret
!=
0
)
{
dev_err
(
&
i2c
->
dev
,
"Failed to read chip ID: %d
\n
"
,
ret
);
goto
err_regmap
;
return
ret
;
}
if
(
reg
!=
0x9081
)
{
dev_err
(
&
i2c
->
dev
,
"Device is not a WM9081: ID=0x%x
\n
"
,
reg
);
ret
=
-
EINVAL
;
goto
err_regmap
;
return
-
EINVAL
;
}
ret
=
wm9081_reset
(
wm9081
->
regmap
);
if
(
ret
<
0
)
{
dev_err
(
&
i2c
->
dev
,
"Failed to issue reset
\n
"
);
goto
err_regmap
;
return
ret
;
}
if
(
dev_get_platdata
(
&
i2c
->
dev
))
...
...
@@ -1382,23 +1381,14 @@ static __devinit int wm9081_i2c_probe(struct i2c_client *i2c,
ret
=
snd_soc_register_codec
(
&
i2c
->
dev
,
&
soc_codec_dev_wm9081
,
&
wm9081_dai
,
1
);
if
(
ret
<
0
)
goto
err_regmap
;
return
ret
;
return
0
;
err_regmap:
regmap_exit
(
wm9081
->
regmap
);
err:
return
ret
;
}
static
__devexit
int
wm9081_i2c_remove
(
struct
i2c_client
*
client
)
{
struct
wm9081_priv
*
wm9081
=
i2c_get_clientdata
(
client
);
snd_soc_unregister_codec
(
&
client
->
dev
);
regmap_exit
(
wm9081
->
regmap
);
return
0
;
}
...
...
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