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
854c21cc
Commit
854c21cc
authored
Feb 17, 2004
by
Ben Collins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IEEE1394(r1135): Initial ieee1394_host_class implementation.
parent
fe8f8d99
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
1 deletion
+22
-1
drivers/ieee1394/hosts.c
drivers/ieee1394/hosts.c
+8
-1
drivers/ieee1394/hosts.h
drivers/ieee1394/hosts.h
+1
-0
drivers/ieee1394/ieee1394_core.c
drivers/ieee1394/ieee1394_core.c
+2
-0
drivers/ieee1394/ieee1394_core.h
drivers/ieee1394/ieee1394_core.h
+1
-0
drivers/ieee1394/nodemgr.c
drivers/ieee1394/nodemgr.c
+10
-0
No files found.
drivers/ieee1394/hosts.c
View file @
854c21cc
...
...
@@ -29,7 +29,6 @@
#include "csr.h"
static
void
delayed_reset_bus
(
unsigned
long
__reset_info
)
{
struct
hpsb_host
*
host
=
(
struct
hpsb_host
*
)
__reset_info
;
...
...
@@ -161,7 +160,14 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra,
memcpy
(
&
h
->
device
,
&
nodemgr_dev_template_host
,
sizeof
(
h
->
device
));
h
->
device
.
parent
=
dev
;
snprintf
(
h
->
device
.
bus_id
,
BUS_ID_SIZE
,
"fw-host%d"
,
h
->
id
);
h
->
class_dev
.
dev
=
&
h
->
device
;
h
->
class_dev
.
class
=
&
hpsb_host_class
;
snprintf
(
h
->
class_dev
.
class_id
,
BUS_ID_SIZE
,
"fw-host%d"
,
h
->
id
);
device_register
(
&
h
->
device
);
class_device_register
(
&
h
->
class_dev
);
get_device
(
&
h
->
device
);
return
h
;
}
...
...
@@ -178,6 +184,7 @@ void hpsb_remove_host(struct hpsb_host *host)
highlevel_remove_host
(
host
);
class_device_unregister
(
&
host
->
class_dev
);
device_unregister
(
&
host
->
device
);
}
...
...
drivers/ieee1394/hosts.h
View file @
854c21cc
...
...
@@ -61,6 +61,7 @@ struct hpsb_host {
int
id
;
struct
device
device
;
struct
class_device
class_dev
;
int
update_config_rom
;
struct
timer_list
delayed_reset
;
...
...
drivers/ieee1394/ieee1394_core.c
View file @
854c21cc
...
...
@@ -1004,6 +1004,7 @@ static int __init ieee1394_init(void)
bus_register
(
&
ieee1394_bus_type
);
bus_create_file
(
&
ieee1394_bus_type
,
&
bus_attr_destroy
);
class_register
(
&
hpsb_host_class
);
if
(
init_csr
())
return
-
ENOMEM
;
...
...
@@ -1023,6 +1024,7 @@ static void __exit ieee1394_cleanup(void)
cleanup_csr
();
class_unregister
(
&
hpsb_host_class
);
bus_remove_file
(
&
ieee1394_bus_type
,
&
bus_attr_destroy
);
bus_unregister
(
&
ieee1394_bus_type
);
...
...
drivers/ieee1394/ieee1394_core.h
View file @
854c21cc
...
...
@@ -215,5 +215,6 @@ static inline unsigned char ieee1394_file_to_instance(struct file *file)
/* Our sysfs bus entry */
extern
struct
bus_type
ieee1394_bus_type
;
extern
struct
class
hpsb_host_class
;
#endif
/* _IEEE1394_CORE_H */
drivers/ieee1394/nodemgr.c
View file @
854c21cc
...
...
@@ -127,6 +127,16 @@ struct bus_type ieee1394_bus_type = {
.
hotplug
=
nodemgr_hotplug
,
};
static
void
host_cls_release
(
struct
class_device
*
class_dev
)
{
put_device
(
&
container_of
((
class_dev
),
struct
hpsb_host
,
class_dev
)
->
device
);
}
struct
class
hpsb_host_class
=
{
.
name
=
"ieee1394_host"
,
.
release
=
host_cls_release
,
};
static
struct
hpsb_highlevel
nodemgr_highlevel
;
static
int
nodemgr_platform_data_ne
;
...
...
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