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
nexedi
linux
Commits
d5e58ea5
Commit
d5e58ea5
authored
Apr 04, 2003
by
Oliver Neukum
Committed by
Greg Kroah-Hartman
Apr 04, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: removing unnecessary calls to usb_set_configuration
- remove unnecessary calls to usb_set_configuration
parent
b0af79be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
31 deletions
+0
-31
drivers/usb/class/usb-midi.c
drivers/usb/class/usb-midi.c
+0
-31
No files found.
drivers/usb/class/usb-midi.c
View file @
d5e58ea5
...
...
@@ -1806,22 +1806,6 @@ static int detect_yamaha_device( struct usb_device *d, unsigned int ifnum, struc
printk
(
KERN_INFO
"usb-midi: Found YAMAHA USB-MIDI device on dev %04x:%04x, iface %d
\n
"
,
d
->
descriptor
.
idVendor
,
d
->
descriptor
.
idProduct
,
ifnum
);
for
(
i
=
0
;
i
<
d
->
descriptor
.
bNumConfigurations
;
i
++
)
{
if
(
d
->
config
+
i
==
c
)
goto
configfound
;
}
printk
(
KERN_INFO
"usb-midi: Config not found.
\n
"
);
return
-
EINVAL
;
configfound:
/* this may not be necessary. */
if
(
usb_set_configuration
(
d
,
c
->
desc
.
bConfigurationValue
)
<
0
)
{
printk
(
KERN_INFO
"usb-midi: Could not set config.
\n
"
);
return
-
EINVAL
;
}
ret
=
usb_get_descriptor
(
d
,
USB_DT_CONFIG
,
i
,
buf
,
USB_DT_CONFIG_SIZE
);
if
(
ret
<
0
)
{
printk
(
KERN_INFO
"usb-midi: Could not get config (error=%d).
\n
"
,
ret
);
...
...
@@ -1916,21 +1900,6 @@ static int detect_midi_subclass(struct usb_device *d, unsigned int ifnum, struct
printk
(
KERN_INFO
"usb-midi: Found MIDISTREAMING on dev %04x:%04x, iface %d
\n
"
,
d
->
descriptor
.
idVendor
,
d
->
descriptor
.
idProduct
,
ifnum
);
for
(
i
=
0
;
i
<
d
->
descriptor
.
bNumConfigurations
;
i
++
)
{
if
(
d
->
config
+
i
==
c
)
goto
configfound
;
}
printk
(
KERN_INFO
"usb-midi: Config not found.
\n
"
);
return
-
EINVAL
;
configfound:
/* this may not be necessary. */
if
(
usb_set_configuration
(
d
,
c
->
desc
.
bConfigurationValue
)
<
0
)
{
printk
(
KERN_INFO
"usb-midi: Could not set config.
\n
"
);
return
-
EINVAL
;
}
/* From USB Spec v2.0, Section 9.5.
If the class or vendor specific descriptors use the same format
...
...
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