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
b55cdbfa
Commit
b55cdbfa
authored
Jul 11, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PCMCIA] Clean up class device attribute registration and fix build error
parent
b45aa330
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
drivers/pcmcia/socket_sysfs.c
drivers/pcmcia/socket_sysfs.c
+17
-14
No files found.
drivers/pcmcia/socket_sysfs.c
View file @
b55cdbfa
...
@@ -134,21 +134,24 @@ static struct class_device_attribute *pccard_socket_attributes[] = {
...
@@ -134,21 +134,24 @@ static struct class_device_attribute *pccard_socket_attributes[] = {
static
int
__devinit
pccard_sysfs_add_socket
(
struct
class_device
*
class_dev
)
static
int
__devinit
pccard_sysfs_add_socket
(
struct
class_device
*
class_dev
)
{
{
unsigned
int
i
;
struct
class_device_attribute
**
attr
;
int
ret
=
0
;
int
ret
=
0
;
for
(
i
=
0
;
(
attr
=
pccard_socket_attributes
[
i
]);
i
++
)
{
if
((
ret
=
class_device_create_file
(
class_dev
,
attr
)))
for
(
attr
=
pccard_socket_attributes
;
*
attr
;
attr
++
)
{
return
(
ret
);
ret
=
class_device_create_file
(
class_dev
,
*
attr
);
if
(
ret
)
break
;
}
}
return
(
ret
);
return
ret
;
}
}
static
void
__devexit
pccard_sysfs_remove_socket
(
struct
class_device
*
class_dev
)
static
void
__devexit
pccard_sysfs_remove_socket
(
struct
class_device
*
class_dev
)
{
{
struct
class_device_attribute
*
attr
;
struct
class_device_attribute
*
*
attr
;
unsigned
int
i
;
for
(
i
=
0
;
(
attr
=
pccard_socket_attributes
[
i
]);
i
++
)
for
(
attr
=
pccard_socket_attributes
;
*
attr
;
attr
++
)
class_device_remove_file
(
class_dev
,
attr
);
class_device_remove_file
(
class_dev
,
*
attr
);
}
}
struct
class_interface
pccard_sysfs_interface
=
{
struct
class_interface
pccard_sysfs_interface
=
{
...
...
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