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
3dedb61e
Commit
3dedb61e
authored
Aug 31, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regmap/topic/patch' into regmap-next
parents
1801ceaf
aab13ebc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
drivers/base/regmap/regmap.c
drivers/base/regmap/regmap.c
+8
-9
No files found.
drivers/base/regmap/regmap.c
View file @
3dedb61e
...
...
@@ -1891,13 +1891,10 @@ EXPORT_SYMBOL_GPL(regmap_async_complete);
int
regmap_register_patch
(
struct
regmap
*
map
,
const
struct
reg_default
*
regs
,
int
num_regs
)
{
struct
reg_default
*
p
;
int
i
,
ret
;
bool
bypass
;
/* If needed the implementation can be extended to support this */
if
(
map
->
patch
)
return
-
EBUSY
;
map
->
lock
(
map
->
lock_arg
);
bypass
=
map
->
cache_bypass
;
...
...
@@ -1914,11 +1911,13 @@ int regmap_register_patch(struct regmap *map, const struct reg_default *regs,
}
}
map
->
patch
=
kcalloc
(
num_regs
,
sizeof
(
struct
reg_default
),
GFP_KERNEL
);
if
(
map
->
patch
!=
NULL
)
{
memcpy
(
map
->
patch
,
regs
,
num_regs
*
sizeof
(
struct
reg_default
));
map
->
patch_regs
=
num_regs
;
p
=
krealloc
(
map
->
patch
,
sizeof
(
struct
reg_default
)
*
(
map
->
patch_regs
+
num_regs
),
GFP_KERNEL
);
if
(
p
)
{
memcpy
(
p
+
map
->
patch_regs
,
regs
,
num_regs
*
sizeof
(
*
regs
));
map
->
patch
=
p
;
map
->
patch_regs
+=
num_regs
;
}
else
{
ret
=
-
ENOMEM
;
}
...
...
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