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
cc939939
Commit
cc939939
authored
Dec 12, 2016
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/topic/dma' into spi-next
parents
05232669
8dd4a016
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
drivers/spi/spi.c
drivers/spi/spi.c
+5
-2
No files found.
drivers/spi/spi.c
View file @
cc939939
...
...
@@ -725,6 +725,7 @@ static int spi_map_buf(struct spi_master *master, struct device *dev,
int
desc_len
;
int
sgs
;
struct
page
*
vm_page
;
struct
scatterlist
*
sg
;
void
*
sg_buf
;
size_t
min
;
int
i
,
ret
;
...
...
@@ -743,6 +744,7 @@ static int spi_map_buf(struct spi_master *master, struct device *dev,
if
(
ret
!=
0
)
return
ret
;
sg
=
&
sgt
->
sgl
[
0
];
for
(
i
=
0
;
i
<
sgs
;
i
++
)
{
if
(
vmalloced_buf
||
kmap_buf
)
{
...
...
@@ -756,16 +758,17 @@ static int spi_map_buf(struct spi_master *master, struct device *dev,
sg_free_table
(
sgt
);
return
-
ENOMEM
;
}
sg_set_page
(
&
sgt
->
sgl
[
i
]
,
vm_page
,
sg_set_page
(
sg
,
vm_page
,
min
,
offset_in_page
(
buf
));
}
else
{
min
=
min_t
(
size_t
,
len
,
desc_len
);
sg_buf
=
buf
;
sg_set_buf
(
&
sgt
->
sgl
[
i
]
,
sg_buf
,
min
);
sg_set_buf
(
sg
,
sg_buf
,
min
);
}
buf
+=
min
;
len
-=
min
;
sg
=
sg_next
(
sg
);
}
ret
=
dma_map_sg
(
dev
,
sgt
->
sgl
,
sgt
->
nents
,
dir
);
...
...
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