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
11c28cfc
Commit
11c28cfc
authored
Sep 01, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/topic/orion' into spi-next
parents
4374f332
1729ce34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
17 deletions
+5
-17
drivers/spi/spi-orion.c
drivers/spi/spi-orion.c
+5
-17
No files found.
drivers/spi/spi-orion.c
View file @
11c28cfc
...
...
@@ -447,30 +447,22 @@ static int orion_spi_probe(struct platform_device *pdev)
spi
->
min_speed
=
DIV_ROUND_UP
(
tclk_hz
,
30
);
r
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
0
);
if
(
r
==
NULL
)
{
status
=
-
ENODEV
;
spi
->
base
=
devm_ioremap_resource
(
&
pdev
->
dev
,
r
);
if
(
IS_ERR
(
spi
->
base
))
{
status
=
PTR_ERR
(
spi
->
base
);
goto
out_rel_clk
;
}
if
(
!
request_mem_region
(
r
->
start
,
resource_size
(
r
),
dev_name
(
&
pdev
->
dev
)))
{
status
=
-
EBUSY
;
goto
out_rel_clk
;
}
spi
->
base
=
ioremap
(
r
->
start
,
SZ_1K
);
if
(
orion_spi_reset
(
spi
)
<
0
)
goto
out_rel_
mem
;
goto
out_rel_
clk
;
master
->
dev
.
of_node
=
pdev
->
dev
.
of_node
;
status
=
spi_register_master
(
master
);
if
(
status
<
0
)
goto
out_rel_
mem
;
goto
out_rel_
clk
;
return
status
;
out_rel_mem:
release_mem_region
(
r
->
start
,
resource_size
(
r
));
out_rel_clk:
clk_disable_unprepare
(
spi
->
clk
);
clk_put
(
spi
->
clk
);
...
...
@@ -483,7 +475,6 @@ static int orion_spi_probe(struct platform_device *pdev)
static
int
orion_spi_remove
(
struct
platform_device
*
pdev
)
{
struct
spi_master
*
master
;
struct
resource
*
r
;
struct
orion_spi
*
spi
;
master
=
platform_get_drvdata
(
pdev
);
...
...
@@ -492,9 +483,6 @@ static int orion_spi_remove(struct platform_device *pdev)
clk_disable_unprepare
(
spi
->
clk
);
clk_put
(
spi
->
clk
);
r
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
0
);
release_mem_region
(
r
->
start
,
resource_size
(
r
));
spi_unregister_master
(
master
);
return
0
;
...
...
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