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
b022aba5
Commit
b022aba5
authored
Dec 10, 2012
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/wm9090' into asoc-next
parents
7136b605
be7eaf53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
sound/soc/codecs/wm9090.c
sound/soc/codecs/wm9090.c
+6
-14
No files found.
sound/soc/codecs/wm9090.c
View file @
b022aba5
...
...
@@ -628,7 +628,7 @@ static int wm9090_i2c_probe(struct i2c_client *i2c,
return
-
ENOMEM
;
}
wm9090
->
regmap
=
regmap_init_i2c
(
i2c
,
&
wm9090_regmap
);
wm9090
->
regmap
=
devm_
regmap_init_i2c
(
i2c
,
&
wm9090_regmap
);
if
(
IS_ERR
(
wm9090
->
regmap
))
{
ret
=
PTR_ERR
(
wm9090
->
regmap
);
dev_err
(
&
i2c
->
dev
,
"Failed to allocate regmap: %d
\n
"
,
ret
);
...
...
@@ -637,16 +637,16 @@ static int wm9090_i2c_probe(struct i2c_client *i2c,
ret
=
regmap_read
(
wm9090
->
regmap
,
WM9090_SOFTWARE_RESET
,
&
reg
);
if
(
ret
<
0
)
goto
err
;
return
ret
;
if
(
reg
!=
0x9093
)
{
dev_err
(
&
i2c
->
dev
,
"Device is not a WM9090, ID=%x
\n
"
,
reg
);
ret
=
-
ENODEV
;
goto
err
;
return
-
ENODEV
;
}
ret
=
regmap_write
(
wm9090
->
regmap
,
WM9090_SOFTWARE_RESET
,
0
);
if
(
ret
<
0
)
goto
err
;
return
ret
;
if
(
i2c
->
dev
.
platform_data
)
memcpy
(
&
wm9090
->
pdata
,
i2c
->
dev
.
platform_data
,
...
...
@@ -658,23 +658,15 @@ static int wm9090_i2c_probe(struct i2c_client *i2c,
&
soc_codec_dev_wm9090
,
NULL
,
0
);
if
(
ret
!=
0
)
{
dev_err
(
&
i2c
->
dev
,
"Failed to register CODEC: %d
\n
"
,
ret
);
goto
err
;
return
ret
;
}
return
0
;
err:
regmap_exit
(
wm9090
->
regmap
);
return
ret
;
}
static
int
__devexit
wm9090_i2c_remove
(
struct
i2c_client
*
i2c
)
{
struct
wm9090_priv
*
wm9090
=
i2c_get_clientdata
(
i2c
);
snd_soc_unregister_codec
(
&
i2c
->
dev
);
regmap_exit
(
wm9090
->
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