Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
aed80892
Commit
aed80892
authored
Jan 17, 2009
by
Stefan Richter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewire: core: move some functions
Signed-off-by:
Stefan Richter
<
stefanr@s5r6.in-berlin.de
>
parent
41f321c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
46 deletions
+44
-46
drivers/firewire/fw-device.c
drivers/firewire/fw-device.c
+44
-46
No files found.
drivers/firewire/fw-device.c
View file @
aed80892
...
@@ -155,27 +155,6 @@ struct bus_type fw_bus_type = {
...
@@ -155,27 +155,6 @@ struct bus_type fw_bus_type = {
};
};
EXPORT_SYMBOL
(
fw_bus_type
);
EXPORT_SYMBOL
(
fw_bus_type
);
static
void
fw_device_release
(
struct
device
*
dev
)
{
struct
fw_device
*
device
=
fw_device
(
dev
);
struct
fw_card
*
card
=
device
->
card
;
unsigned
long
flags
;
/*
* Take the card lock so we don't set this to NULL while a
* FW_NODE_UPDATED callback is being handled or while the
* bus manager work looks at this node.
*/
spin_lock_irqsave
(
&
card
->
lock
,
flags
);
device
->
node
->
data
=
NULL
;
spin_unlock_irqrestore
(
&
card
->
lock
,
flags
);
fw_node_put
(
device
->
node
);
kfree
(
device
->
config_rom
);
kfree
(
device
);
fw_card_put
(
card
);
}
int
fw_device_enable_phys_dma
(
struct
fw_device
*
device
)
int
fw_device_enable_phys_dma
(
struct
fw_device
*
device
)
{
{
int
generation
=
device
->
generation
;
int
generation
=
device
->
generation
;
...
@@ -679,11 +658,53 @@ static void fw_device_shutdown(struct work_struct *work)
...
@@ -679,11 +658,53 @@ static void fw_device_shutdown(struct work_struct *work)
fw_device_put
(
device
);
fw_device_put
(
device
);
}
}
static
void
fw_device_release
(
struct
device
*
dev
)
{
struct
fw_device
*
device
=
fw_device
(
dev
);
struct
fw_card
*
card
=
device
->
card
;
unsigned
long
flags
;
/*
* Take the card lock so we don't set this to NULL while a
* FW_NODE_UPDATED callback is being handled or while the
* bus manager work looks at this node.
*/
spin_lock_irqsave
(
&
card
->
lock
,
flags
);
device
->
node
->
data
=
NULL
;
spin_unlock_irqrestore
(
&
card
->
lock
,
flags
);
fw_node_put
(
device
->
node
);
kfree
(
device
->
config_rom
);
kfree
(
device
);
fw_card_put
(
card
);
}
static
struct
device_type
fw_device_type
=
{
static
struct
device_type
fw_device_type
=
{
.
release
=
fw_device_release
,
.
release
=
fw_device_release
,
};
};
static
void
fw_device_update
(
struct
work_struct
*
work
);
static
int
update_unit
(
struct
device
*
dev
,
void
*
data
)
{
struct
fw_unit
*
unit
=
fw_unit
(
dev
);
struct
fw_driver
*
driver
=
(
struct
fw_driver
*
)
dev
->
driver
;
if
(
is_fw_unit
(
dev
)
&&
driver
!=
NULL
&&
driver
->
update
!=
NULL
)
{
down
(
&
dev
->
sem
);
driver
->
update
(
unit
);
up
(
&
dev
->
sem
);
}
return
0
;
}
static
void
fw_device_update
(
struct
work_struct
*
work
)
{
struct
fw_device
*
device
=
container_of
(
work
,
struct
fw_device
,
work
.
work
);
fw_device_cdev_update
(
device
);
device_for_each_child
(
&
device
->
device
,
NULL
,
update_unit
);
}
/*
/*
* If a device was pending for deletion because its node went away but its
* If a device was pending for deletion because its node went away but its
...
@@ -851,29 +872,6 @@ static void fw_device_init(struct work_struct *work)
...
@@ -851,29 +872,6 @@ static void fw_device_init(struct work_struct *work)
put_device
(
&
device
->
device
);
/* our reference */
put_device
(
&
device
->
device
);
/* our reference */
}
}
static
int
update_unit
(
struct
device
*
dev
,
void
*
data
)
{
struct
fw_unit
*
unit
=
fw_unit
(
dev
);
struct
fw_driver
*
driver
=
(
struct
fw_driver
*
)
dev
->
driver
;
if
(
is_fw_unit
(
dev
)
&&
driver
!=
NULL
&&
driver
->
update
!=
NULL
)
{
down
(
&
dev
->
sem
);
driver
->
update
(
unit
);
up
(
&
dev
->
sem
);
}
return
0
;
}
static
void
fw_device_update
(
struct
work_struct
*
work
)
{
struct
fw_device
*
device
=
container_of
(
work
,
struct
fw_device
,
work
.
work
);
fw_device_cdev_update
(
device
);
device_for_each_child
(
&
device
->
device
,
NULL
,
update_unit
);
}
enum
{
enum
{
REREAD_BIB_ERROR
,
REREAD_BIB_ERROR
,
REREAD_BIB_GONE
,
REREAD_BIB_GONE
,
...
...
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