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
0fd018d5
Commit
0fd018d5
authored
May 29, 2003
by
Arnaldo Carvalho de Melo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
o drivers/class/usb-midi: initialize struct usb_driver ->owner field
And remove MOD_{INC,DEC}_USE_COUNT
parent
c2716443
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
21 deletions
+2
-21
drivers/usb/class/usb-midi.c
drivers/usb/class/usb-midi.c
+2
-21
No files found.
drivers/usb/class/usb-midi.c
View file @
0fd018d5
...
@@ -55,8 +55,6 @@ extern int usb_get_string(struct usb_device *dev, unsigned short langid, unsigne
...
@@ -55,8 +55,6 @@ extern int usb_get_string(struct usb_device *dev, unsigned short langid, unsigne
#undef HAVE_SUPPORT_ALSA
#undef HAVE_SUPPORT_ALSA
#undef MOD_INC_EACH_PROBE
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
static
int
singlebyte
=
0
;
static
int
singlebyte
=
0
;
...
@@ -925,11 +923,6 @@ static int usb_midi_open(struct inode *inode, struct file *file)
...
@@ -925,11 +923,6 @@ static int usb_midi_open(struct inode *inode, struct file *file)
printk(KERN_INFO "usb-midi: Open Succeeded. minor= %d.\n", minor);
printk(KERN_INFO "usb-midi: Open Succeeded. minor= %d.\n", minor);
#endif
#endif
/** Side-effect: module cannot be removed until USE_COUNT is 0. **/
#ifndef MOD_INC_EACH_PROBE
MOD_INC_USE_COUNT
;
#endif
return
0
;
/** Success. **/
return
0
;
/** Success. **/
}
}
...
@@ -978,15 +971,11 @@ static int usb_midi_release(struct inode *inode, struct file *file)
...
@@ -978,15 +971,11 @@ static int usb_midi_release(struct inode *inode, struct file *file)
wake_up
(
&
open_wait
);
wake_up
(
&
open_wait
);
file
->
private_data
=
0
;
file
->
private_data
=
0
;
/** Sideeffect: Module cannot be removed until usecount is 0. */
#ifndef MOD_INC_EACH_PROBE
MOD_DEC_USE_COUNT
;
#endif
return
0
;
return
0
;
}
}
static
struct
file_operations
usb_midi_fops
=
{
static
struct
file_operations
usb_midi_fops
=
{
.
owner
=
THIS_MODULE
,
.
llseek
=
usb_midi_llseek
,
.
llseek
=
usb_midi_llseek
,
.
read
=
usb_midi_read
,
.
read
=
usb_midi_read
,
.
write
=
usb_midi_write
,
.
write
=
usb_midi_write
,
...
@@ -2040,10 +2029,6 @@ static int usb_midi_probe(struct usb_interface *intf,
...
@@ -2040,10 +2029,6 @@ static int usb_midi_probe(struct usb_interface *intf,
list_add_tail
(
&
s
->
mididev
,
&
mididevs
);
list_add_tail
(
&
s
->
mididev
,
&
mididevs
);
up
(
&
open_sem
);
up
(
&
open_sem
);
#ifdef MOD_INC_EACH_PROBE
MOD_INC_USE_COUNT
;
#endif
usb_set_intfdata
(
intf
,
s
);
usb_set_intfdata
(
intf
,
s
);
return
0
;
return
0
;
}
}
...
@@ -2081,11 +2066,6 @@ static void usb_midi_disconnect(struct usb_interface *intf)
...
@@ -2081,11 +2066,6 @@ static void usb_midi_disconnect(struct usb_interface *intf)
}
}
release_midi_device
(
s
);
release_midi_device
(
s
);
wake_up
(
&
open_wait
);
wake_up
(
&
open_wait
);
#ifdef MOD_INC_EACH_PROBE
MOD_DEC_USE_COUNT
;
#endif
return
;
}
}
/* we want to look at all devices by hand */
/* we want to look at all devices by hand */
...
@@ -2095,6 +2075,7 @@ static struct usb_device_id id_table[] = {
...
@@ -2095,6 +2075,7 @@ static struct usb_device_id id_table[] = {
};
};
static
struct
usb_driver
usb_midi_driver
=
{
static
struct
usb_driver
usb_midi_driver
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"midi"
,
.
name
=
"midi"
,
.
probe
=
usb_midi_probe
,
.
probe
=
usb_midi_probe
,
.
disconnect
=
usb_midi_disconnect
,
.
disconnect
=
usb_midi_disconnect
,
...
...
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