projects
/
platform
/
kernel
/
linux-amlogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f7df57
)
mfd: Check for mem_base when building IORESOURCE_MEM resources
author
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 26 Mar 2010 00:09:04 +0000
(
01:09
+0100)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 27 May 2010 23:37:31 +0000
(
01:37
+0200)
If mem_base is NULL, then we fall back to the default case, just copying the
original resource.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/mfd-core.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/mfd-core.c
b/drivers/mfd/mfd-core.c
index
8ffbb7a
..
7dd76bc
100644
(file)
--- a/
drivers/mfd/mfd-core.c
+++ b/
drivers/mfd/mfd-core.c
@@
-48,7
+48,7
@@
static int mfd_add_device(struct device *parent, int id,
res[r].flags = cell->resources[r].flags;
/* Find out base to use */
- if (
cell->resources[r].flags & IORESOURCE_MEM
) {
+ if (
(cell->resources[r].flags & IORESOURCE_MEM) && mem_base
) {
res[r].parent = mem_base;
res[r].start = mem_base->start +
cell->resources[r].start;