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
4c21480a
Commit
4c21480a
authored
Dec 26, 2002
by
Greg Kroah-Hartman
Committed by
Vojtech Pavlik
Dec 26, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: take out private pointer from struct usb_serial_port
The struct device pointer should be used instead.
parent
da73843f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
drivers/usb/serial/usb-serial.h
drivers/usb/serial/usb-serial.h
+11
-4
No files found.
drivers/usb/serial/usb-serial.h
View file @
4c21480a
...
@@ -90,9 +90,6 @@
...
@@ -90,9 +90,6 @@
* @work: work queue entry for the line discipline waking up.
* @work: work queue entry for the line discipline waking up.
* @open_count: number of times this port has been opened.
* @open_count: number of times this port has been opened.
* @sem: struct semaphore used to lock this structure.
* @sem: struct semaphore used to lock this structure.
* @private: place to put any driver specific information that is needed. The
* usb-serial driver is required to manage this data, the usb-serial core
* will not touch this.
*
*
* This structure is used by the usb-serial core and drivers for the specific
* This structure is used by the usb-serial core and drivers for the specific
* ports of a device.
* ports of a device.
...
@@ -120,11 +117,21 @@ struct usb_serial_port {
...
@@ -120,11 +117,21 @@ struct usb_serial_port {
struct
work_struct
work
;
struct
work_struct
work
;
int
open_count
;
int
open_count
;
struct
semaphore
sem
;
struct
semaphore
sem
;
void
*
private
;
struct
device
dev
;
struct
device
dev
;
};
};
#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)
#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)
/* get and set the port private data pointer helper functions */
static
inline
void
*
usb_get_serial_port_data
(
struct
usb_serial_port
*
port
)
{
return
dev_get_drvdata
(
&
port
->
dev
);
}
static
inline
void
usb_set_serial_port_data
(
struct
usb_serial_port
*
port
,
void
*
data
)
{
dev_set_drvdata
(
&
port
->
dev
,
data
);
}
/**
/**
* usb_serial - structure used by the usb-serial core for a device
* usb_serial - structure used by the usb-serial core for a device
* @magic: magic number for internal validity of this pointer.
* @magic: magic number for internal validity of this pointer.
...
...
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