Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
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-2.6.23
Commits
e7ccdfec
Commit
e7ccdfec
authored
Aug 28, 2006
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: fix __must_check warnings in drivers/usb/atm/
Signed-off-by:
Greg Kroah-Hartman
<
gregkh@suse.de
>
parent
4d42e1bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
40 deletions
+34
-40
drivers/usb/atm/ueagle-atm.c
drivers/usb/atm/ueagle-atm.c
+34
-40
No files found.
drivers/usb/atm/ueagle-atm.c
View file @
e7ccdfec
...
...
@@ -1621,26 +1621,32 @@ static int claim_interface(struct usb_device *usb_dev,
return
ret
;
}
static
void
create_fs_entries
(
struct
uea_softc
*
sc
,
struct
usb_interface
*
intf
)
static
struct
attribute
*
attrs
[]
=
{
&
dev_attr_stat_status
.
attr
,
&
dev_attr_stat_mflags
.
attr
,
&
dev_attr_stat_human_status
.
attr
,
&
dev_attr_stat_delin
.
attr
,
&
dev_attr_stat_vidcpe
.
attr
,
&
dev_attr_stat_usrate
.
attr
,
&
dev_attr_stat_dsrate
.
attr
,
&
dev_attr_stat_usattenuation
.
attr
,
&
dev_attr_stat_dsattenuation
.
attr
,
&
dev_attr_stat_usmargin
.
attr
,
&
dev_attr_stat_dsmargin
.
attr
,
&
dev_attr_stat_txflow
.
attr
,
&
dev_attr_stat_rxflow
.
attr
,
&
dev_attr_stat_uscorr
.
attr
,
&
dev_attr_stat_dscorr
.
attr
,
&
dev_attr_stat_usunc
.
attr
,
&
dev_attr_stat_dsunc
.
attr
,
};
static
struct
attribute_group
attr_grp
=
{
.
attrs
=
attrs
,
};
static
int
create_fs_entries
(
struct
usb_interface
*
intf
)
{
/* sysfs interface */
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_status
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_mflags
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_human_status
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_delin
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_vidcpe
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_usrate
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_dsrate
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_usattenuation
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_dsattenuation
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_usmargin
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_dsmargin
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_txflow
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_rxflow
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_uscorr
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_dscorr
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_usunc
);
device_create_file
(
&
intf
->
dev
,
&
dev_attr_stat_dsunc
);
return
sysfs_create_group
(
&
intf
->
dev
.
kobj
,
&
attr_grp
);
}
static
int
uea_bind
(
struct
usbatm_data
*
usbatm
,
struct
usb_interface
*
intf
,
...
...
@@ -1708,37 +1714,25 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
return
ret
;
}
create_fs_entries
(
sc
,
intf
);
ret
=
create_fs_entries
(
intf
);
if
(
ret
)
{
uea_stop
(
sc
);
kfree
(
sc
);
return
ret
;
}
return
0
;
}
static
void
destroy_fs_entries
(
struct
u
ea_softc
*
sc
,
struct
u
sb_interface
*
intf
)
static
void
destroy_fs_entries
(
struct
usb_interface
*
intf
)
{
/* sysfs interface */
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_status
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_mflags
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_human_status
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_delin
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_vidcpe
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_usrate
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_dsrate
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_usattenuation
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_dsattenuation
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_usmargin
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_dsmargin
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_txflow
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_rxflow
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_uscorr
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_dscorr
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_usunc
);
device_remove_file
(
&
intf
->
dev
,
&
dev_attr_stat_dsunc
);
sysfs_remove_group
(
&
intf
->
dev
.
kobj
,
&
attr_grp
);
}
static
void
uea_unbind
(
struct
usbatm_data
*
usbatm
,
struct
usb_interface
*
intf
)
{
struct
uea_softc
*
sc
=
usbatm
->
driver_data
;
destroy_fs_entries
(
sc
,
intf
);
destroy_fs_entries
(
intf
);
uea_stop
(
sc
);
kfree
(
sc
);
}
...
...
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