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
d2c44523
Commit
d2c44523
authored
Jan 14, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: added .owner for USB drivers that have a struct tty_driver
parent
078dfbd2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
9 deletions
+3
-9
drivers/usb/class/bluetty.c
drivers/usb/class/bluetty.c
+1
-6
drivers/usb/class/cdc-acm.c
drivers/usb/class/cdc-acm.c
+1
-3
drivers/usb/serial/usb-serial.c
drivers/usb/serial/usb-serial.c
+1
-0
No files found.
drivers/usb/class/bluetty.c
View file @
d2c44523
...
...
@@ -1107,20 +1107,17 @@ static int usb_bluetooth_probe (struct usb_interface *intf,
return
-
EIO
;
}
MOD_INC_USE_COUNT
;
info
(
"USB Bluetooth converter detected"
);
for
(
minor
=
0
;
minor
<
BLUETOOTH_TTY_MINORS
&&
bluetooth_table
[
minor
];
++
minor
)
;
if
(
bluetooth_table
[
minor
])
{
err
(
"No more free Bluetooth devices"
);
MOD_DEC_USE_COUNT
;
return
-
ENODEV
;
}
if
(
!
(
bluetooth
=
kmalloc
(
sizeof
(
struct
usb_bluetooth
),
GFP_KERNEL
)))
{
err
(
"Out of memory"
);
MOD_DEC_USE_COUNT
;
return
-
ENOMEM
;
}
...
...
@@ -1236,7 +1233,6 @@ static int usb_bluetooth_probe (struct usb_interface *intf,
/* free up any memory that we allocated */
kfree
(
bluetooth
);
MOD_DEC_USE_COUNT
;
return
-
EIO
;
}
...
...
@@ -1295,13 +1291,12 @@ static void usb_bluetooth_disconnect(struct usb_interface *intf)
}
else
{
info
(
"device disconnected"
);
}
MOD_DEC_USE_COUNT
;
}
static
struct
tty_driver
bluetooth_tty_driver
=
{
.
magic
=
TTY_DRIVER_MAGIC
,
.
owner
=
THIS_MODULE
,
.
driver_name
=
"usb-bluetooth"
,
.
name
=
"usb/ttub/%d"
,
.
major
=
BLUETOOTH_TTY_MAJOR
,
...
...
drivers/usb/class/cdc-acm.c
View file @
d2c44523
...
...
@@ -320,8 +320,6 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
tty
->
driver_data
=
acm
;
acm
->
tty
=
tty
;
MOD_INC_USE_COUNT
;
lock_kernel
();
if
(
acm
->
used
++
)
{
...
...
@@ -369,7 +367,6 @@ static void acm_tty_close(struct tty_struct *tty, struct file *filp)
kfree
(
acm
);
}
}
MOD_DEC_USE_COUNT
;
}
static
int
acm_tty_write
(
struct
tty_struct
*
tty
,
int
from_user
,
const
unsigned
char
*
buf
,
int
count
)
...
...
@@ -724,6 +721,7 @@ static struct termios *acm_tty_termios_locked[ACM_TTY_MINORS];
static
struct
tty_driver
acm_tty_driver
=
{
.
magic
=
TTY_DRIVER_MAGIC
,
.
owner
=
THIS_MODULE
,
.
driver_name
=
"acm"
,
.
name
=
"usb/acm/%d"
,
.
major
=
ACM_TTY_MAJOR
,
...
...
drivers/usb/serial/usb-serial.c
View file @
d2c44523
...
...
@@ -1257,6 +1257,7 @@ void usb_serial_disconnect(struct usb_interface *interface)
struct
tty_driver
usb_serial_tty_driver
=
{
.
magic
=
TTY_DRIVER_MAGIC
,
.
owner
=
THIS_MODULE
,
.
driver_name
=
"usbserial"
,
#ifndef CONFIG_DEVFS_FS
.
name
=
"ttyUSB"
,
...
...
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