Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Simple PCIe FMC carrier SPEC - Software
Commits
e8e3e843
Commit
e8e3e843
authored
Feb 07, 2013
by
Alessandro Rubini
Committed by
Adam Wujek
Oct 27, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wr_nic: use_count only if WR_IS_SWITCH
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
0e172c86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
device.c
kernel/wr_nic/device.c
+13
-13
No files found.
kernel/wr_nic/device.c
View file @
e8e3e843
...
...
@@ -32,11 +32,11 @@ static int wrn_remove(struct platform_device *pdev)
struct
wrn_dev
*
wrn
=
drvdata
->
wrn
;
int
i
;
#if 0
spin_lock(&wrn->lock);
--wrn->use_count; /* Hmmm... looks like overkill... */
spin_unlock(&wrn->lock);
#endif
if
(
WR_IS_SWITCH
)
{
spin_lock
(
&
wrn
->
lock
);
--
wrn
->
use_count
;
/* Hmmm... looks like overkill... */
spin_unlock
(
&
wrn
->
lock
);
}
/* First of all, stop any transmission */
writel
(
0
,
&
wrn
->
regs
->
CR
);
...
...
@@ -114,16 +114,16 @@ static int wrn_probe(struct platform_device *pdev)
/* No need to lock_irq: we only protect count and continue unlocked */
#if 0
spin_lock(&wrn->lock);
if (++wrn->use_count != 1) {
--wrn->use_count;
if
(
WR_IS_SWITCH
)
{
spin_lock
(
&
wrn
->
lock
);
if
(
++
wrn
->
use_count
!=
1
)
{
--
wrn
->
use_count
;
spin_unlock
(
&
wrn
->
lock
);
return
-
EBUSY
;
}
spin_unlock
(
&
wrn
->
lock
);
printk("use count %i\n", wrn->use_count);
return -EBUSY;
}
spin_unlock(&wrn->lock);
#endif
/* Map our resource list and instantiate the shortcut pointers */
if
(
(
err
=
__wrn_map_resources
(
pdev
))
)
goto
out
;
...
...
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