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
38acceff
Commit
38acceff
authored
May 23, 2016
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/topic/core' into spi-next
parents
2dcd0af5
8ba811a7
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 @
38acceff
...
@@ -717,9 +717,11 @@ static int spi_map_buf(struct spi_master *master, struct device *dev,
...
@@ -717,9 +717,11 @@ static int spi_map_buf(struct spi_master *master, struct device *dev,
if
(
vmalloced_buf
)
{
if
(
vmalloced_buf
)
{
desc_len
=
min_t
(
int
,
max_seg_size
,
PAGE_SIZE
);
desc_len
=
min_t
(
int
,
max_seg_size
,
PAGE_SIZE
);
sgs
=
DIV_ROUND_UP
(
len
+
offset_in_page
(
buf
),
desc_len
);
sgs
=
DIV_ROUND_UP
(
len
+
offset_in_page
(
buf
),
desc_len
);
}
else
{
}
else
if
(
virt_addr_valid
(
buf
))
{
desc_len
=
min_t
(
int
,
max_seg_size
,
master
->
max_dma_len
);
desc_len
=
min_t
(
int
,
max_seg_size
,
master
->
max_dma_len
);
sgs
=
DIV_ROUND_UP
(
len
,
desc_len
);
sgs
=
DIV_ROUND_UP
(
len
,
desc_len
);
}
else
{
return
-
EINVAL
;
}
}
ret
=
sg_alloc_table
(
sgt
,
sgs
,
GFP_KERNEL
);
ret
=
sg_alloc_table
(
sgt
,
sgs
,
GFP_KERNEL
);
...
@@ -933,7 +935,7 @@ static int spi_map_msg(struct spi_master *master, struct spi_message *msg)
...
@@ -933,7 +935,7 @@ static int spi_map_msg(struct spi_master *master, struct spi_message *msg)
* spi_transfer_one_message - Default implementation of transfer_one_message()
* spi_transfer_one_message - Default implementation of transfer_one_message()
*
*
* This is a standard implementation of transfer_one_message() for
* This is a standard implementation of transfer_one_message() for
* drivers which imp
el
ment a transfer_one() operation. It provides
* drivers which imp
le
ment a transfer_one() operation. It provides
* standard handling of delays and chip select management.
* standard handling of delays and chip select management.
*/
*/
static
int
spi_transfer_one_message
(
struct
spi_master
*
master
,
static
int
spi_transfer_one_message
(
struct
spi_master
*
master
,
...
@@ -1764,6 +1766,7 @@ struct spi_master *spi_alloc_master(struct device *dev, unsigned size)
...
@@ -1764,6 +1766,7 @@ struct spi_master *spi_alloc_master(struct device *dev, unsigned size)
master
->
num_chipselect
=
1
;
master
->
num_chipselect
=
1
;
master
->
dev
.
class
=
&
spi_master_class
;
master
->
dev
.
class
=
&
spi_master_class
;
master
->
dev
.
parent
=
dev
;
master
->
dev
.
parent
=
dev
;
pm_suspend_ignore_children
(
&
master
->
dev
,
true
);
spi_master_set_devdata
(
master
,
&
master
[
1
]);
spi_master_set_devdata
(
master
,
&
master
[
1
]);
return
master
;
return
master
;
...
...
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