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
fd7f6a57
Commit
fd7f6a57
authored
May 13, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: remove magic number field from struct usb_serial as it's pretty useless.
parent
70f7aa08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
10 deletions
+1
-10
drivers/usb/serial/usb-serial.c
drivers/usb/serial/usb-serial.c
+1
-2
drivers/usb/serial/usb-serial.h
drivers/usb/serial/usb-serial.h
+0
-8
No files found.
drivers/usb/serial/usb-serial.c
View file @
fd7f6a57
...
...
@@ -416,8 +416,7 @@ static struct usb_serial *get_free_serial (struct usb_serial *serial, int num_po
}
if
(
good_spot
==
0
)
continue
;
serial
->
magic
=
USB_SERIAL_MAGIC
;
*
minor
=
i
;
dbg
(
"%s - minor base = %d"
,
__FUNCTION__
,
*
minor
);
for
(
i
=
*
minor
;
(
i
<
(
*
minor
+
num_ports
))
&&
(
i
<
SERIAL_TTY_MINORS
);
++
i
)
...
...
drivers/usb/serial/usb-serial.h
View file @
fd7f6a57
...
...
@@ -62,8 +62,6 @@
#define MAX_NUM_PORTS 8
/* The maximum number of ports one device can grab at once */
#define USB_SERIAL_MAGIC 0x6702
/* magic number for usb_serial struct */
/* parity check flag */
#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
...
...
@@ -130,7 +128,6 @@ static inline void usb_set_serial_port_data (struct usb_serial_port *port, void
/**
* usb_serial - structure used by the usb-serial core for a device
* @magic: magic number for internal validity of this pointer.
* @dev: pointer to the struct usb_device for this device
* @type: pointer to the struct usb_serial_device_type for this device
* @interface: pointer to the struct usb_interface for this device
...
...
@@ -148,7 +145,6 @@ static inline void usb_set_serial_port_data (struct usb_serial_port *port, void
* usb_set_serial_data() to access this.
*/
struct
usb_serial
{
int
magic
;
struct
usb_device
*
dev
;
struct
usb_serial_device_type
*
type
;
struct
usb_interface
*
interface
;
...
...
@@ -305,10 +301,6 @@ static inline int serial_paranoia_check (struct usb_serial *serial, const char *
dbg
(
"%s - serial == NULL"
,
function
);
return
-
1
;
}
if
(
serial
->
magic
!=
USB_SERIAL_MAGIC
)
{
dbg
(
"%s - bad magic number for serial"
,
function
);
return
-
1
;
}
if
(
!
serial
->
type
)
{
dbg
(
"%s - serial->type == NULL!"
,
function
);
return
-
1
;
...
...
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