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
33781870
Commit
33781870
authored
Jun 05, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TTY: release function should be set in the class, not the class_device.
parent
e7522c00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
drivers/char/tty_io.c
drivers/char/tty_io.c
+11
-11
No files found.
drivers/char/tty_io.c
View file @
33781870
...
@@ -2093,10 +2093,6 @@ static void tty_unregister_devfs(struct tty_driver *driver, int index)
...
@@ -2093,10 +2093,6 @@ static void tty_unregister_devfs(struct tty_driver *driver, int index)
# define tty_unregister_devfs(driver, index) do { } while (0)
# define tty_unregister_devfs(driver, index) do { } while (0)
#endif
/* CONFIG_DEVFS_FS */
#endif
/* CONFIG_DEVFS_FS */
static
struct
class
tty_class
=
{
.
name
=
"tty"
,
};
struct
tty_dev
{
struct
tty_dev
{
struct
list_head
node
;
struct
list_head
node
;
dev_t
dev
;
dev_t
dev
;
...
@@ -2104,6 +2100,17 @@ struct tty_dev {
...
@@ -2104,6 +2100,17 @@ struct tty_dev {
};
};
#define to_tty_dev(d) container_of(d, struct tty_dev, class_dev)
#define to_tty_dev(d) container_of(d, struct tty_dev, class_dev)
static
void
release_tty_dev
(
struct
class_device
*
class_dev
)
{
struct
tty_dev
*
tty_dev
=
to_tty_dev
(
class_dev
);
kfree
(
tty_dev
);
}
static
struct
class
tty_class
=
{
.
name
=
"tty"
,
.
release
=
&
release_tty_dev
,
};
static
LIST_HEAD
(
tty_dev_list
);
static
LIST_HEAD
(
tty_dev_list
);
static
spinlock_t
tty_dev_list_lock
=
SPIN_LOCK_UNLOCKED
;
static
spinlock_t
tty_dev_list_lock
=
SPIN_LOCK_UNLOCKED
;
...
@@ -2114,12 +2121,6 @@ static ssize_t show_dev(struct class_device *class_dev, char *buf)
...
@@ -2114,12 +2121,6 @@ static ssize_t show_dev(struct class_device *class_dev, char *buf)
}
}
static
CLASS_DEVICE_ATTR
(
dev
,
S_IRUGO
,
show_dev
,
NULL
);
static
CLASS_DEVICE_ATTR
(
dev
,
S_IRUGO
,
show_dev
,
NULL
);
static
void
release_tty_dev
(
struct
class_device
*
class_dev
)
{
struct
tty_dev
*
tty_dev
=
to_tty_dev
(
class_dev
);
kfree
(
tty_dev
);
}
static
void
tty_add_class_device
(
char
*
name
,
dev_t
dev
,
struct
device
*
device
)
static
void
tty_add_class_device
(
char
*
name
,
dev_t
dev
,
struct
device
*
device
)
{
{
struct
tty_dev
*
tty_dev
=
NULL
;
struct
tty_dev
*
tty_dev
=
NULL
;
...
@@ -2140,7 +2141,6 @@ static void tty_add_class_device(char *name, dev_t dev, struct device *device)
...
@@ -2140,7 +2141,6 @@ static void tty_add_class_device(char *name, dev_t dev, struct device *device)
tty_dev
->
class_dev
.
dev
=
device
;
tty_dev
->
class_dev
.
dev
=
device
;
tty_dev
->
class_dev
.
class
=
&
tty_class
;
tty_dev
->
class_dev
.
class
=
&
tty_class
;
tty_dev
->
class_dev
.
release
=
&
release_tty_dev
;
snprintf
(
tty_dev
->
class_dev
.
class_id
,
BUS_ID_SIZE
,
"%s"
,
temp
);
snprintf
(
tty_dev
->
class_dev
.
class_id
,
BUS_ID_SIZE
,
"%s"
,
temp
);
retval
=
class_device_register
(
&
tty_dev
->
class_dev
);
retval
=
class_device_register
(
&
tty_dev
->
class_dev
);
if
(
retval
)
if
(
retval
)
...
...
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