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
Kirill Smelkov
linux
Commits
7d769802
Commit
7d769802
authored
May 08, 2015
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/fix/omap2-mcspi' into spi-omap2-mcspi
parents
b787f68c
c5a06e75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
drivers/spi/spi-omap2-mcspi.c
drivers/spi/spi-omap2-mcspi.c
+12
-4
No files found.
drivers/spi/spi-omap2-mcspi.c
View file @
7d769802
...
...
@@ -1210,6 +1210,7 @@ static int omap2_mcspi_transfer_one_message(struct spi_master *master,
struct
omap2_mcspi
*
mcspi
;
struct
omap2_mcspi_dma
*
mcspi_dma
;
struct
spi_transfer
*
t
;
int
status
;
spi
=
m
->
spi
;
mcspi
=
spi_master_get_devdata
(
master
);
...
...
@@ -1229,7 +1230,8 @@ static int omap2_mcspi_transfer_one_message(struct spi_master *master,
tx_buf
?
"tx"
:
""
,
rx_buf
?
"rx"
:
""
,
t
->
bits_per_word
);
return
-
EINVAL
;
status
=
-
EINVAL
;
goto
out
;
}
if
(
m
->
is_dma_mapped
||
len
<
DMA_MIN_BYTES
)
...
...
@@ -1241,7 +1243,8 @@ static int omap2_mcspi_transfer_one_message(struct spi_master *master,
if
(
dma_mapping_error
(
mcspi
->
dev
,
t
->
tx_dma
))
{
dev_dbg
(
mcspi
->
dev
,
"dma %cX %d bytes error
\n
"
,
'T'
,
len
);
return
-
EINVAL
;
status
=
-
EINVAL
;
goto
out
;
}
}
if
(
mcspi_dma
->
dma_rx
&&
rx_buf
!=
NULL
)
{
...
...
@@ -1253,14 +1256,19 @@ static int omap2_mcspi_transfer_one_message(struct spi_master *master,
if
(
tx_buf
!=
NULL
)
dma_unmap_single
(
mcspi
->
dev
,
t
->
tx_dma
,
len
,
DMA_TO_DEVICE
);
return
-
EINVAL
;
status
=
-
EINVAL
;
goto
out
;
}
}
}
omap2_mcspi_work
(
mcspi
,
m
);
/* spi_finalize_current_message() changes the status inside the
* spi_message, save the status here. */
status
=
m
->
status
;
out:
spi_finalize_current_message
(
master
);
return
0
;
return
status
;
}
static
int
omap2_mcspi_master_setup
(
struct
omap2_mcspi
*
mcspi
)
...
...
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