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
e431f12e
Commit
e431f12e
authored
Mar 12, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove cdev_set_name completely as it is not needed.
parent
fa31a260
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
0 additions
and
18 deletions
+0
-18
drivers/char/tty_io.c
drivers/char/tty_io.c
+0
-7
drivers/ieee1394/amdtp.c
drivers/ieee1394/amdtp.c
+0
-1
drivers/ieee1394/dv1394.c
drivers/ieee1394/dv1394.c
+0
-1
drivers/ieee1394/raw1394.c
drivers/ieee1394/raw1394.c
+0
-1
drivers/ieee1394/video1394.c
drivers/ieee1394/video1394.c
+0
-1
drivers/s390/char/tape_class.c
drivers/s390/char/tape_class.c
+0
-3
drivers/scsi/sg.c
drivers/scsi/sg.c
+0
-1
drivers/scsi/st.c
drivers/scsi/st.c
+0
-1
include/linux/cdev.h
include/linux/cdev.h
+0
-2
No files found.
drivers/char/tty_io.c
View file @
e431f12e
...
@@ -2274,9 +2274,6 @@ int tty_register_driver(struct tty_driver *driver)
...
@@ -2274,9 +2274,6 @@ int tty_register_driver(struct tty_driver *driver)
driver
->
termios_locked
=
NULL
;
driver
->
termios_locked
=
NULL
;
}
}
cdev_set_name
(
&
driver
->
cdev
,
driver
->
name
);
for
(
s
=
strchr
(
driver
->
cdev
.
kobj
.
name
,
'/'
);
s
;
s
=
strchr
(
s
,
'/'
))
*
s
=
'!'
;
cdev_init
(
&
driver
->
cdev
,
&
tty_fops
);
cdev_init
(
&
driver
->
cdev
,
&
tty_fops
);
driver
->
cdev
.
owner
=
driver
->
owner
;
driver
->
cdev
.
owner
=
driver
->
owner
;
error
=
cdev_add
(
&
driver
->
cdev
,
dev
,
driver
->
num
);
error
=
cdev_add
(
&
driver
->
cdev
,
dev
,
driver
->
num
);
...
@@ -2414,7 +2411,6 @@ static struct cdev vc0_cdev;
...
@@ -2414,7 +2411,6 @@ static struct cdev vc0_cdev;
*/
*/
static
int
__init
tty_init
(
void
)
static
int
__init
tty_init
(
void
)
{
{
cdev_set_name
(
&
tty_cdev
,
"dev.tty"
);
cdev_init
(
&
tty_cdev
,
&
tty_fops
);
cdev_init
(
&
tty_cdev
,
&
tty_fops
);
if
(
cdev_add
(
&
tty_cdev
,
MKDEV
(
TTYAUX_MAJOR
,
0
),
1
)
||
if
(
cdev_add
(
&
tty_cdev
,
MKDEV
(
TTYAUX_MAJOR
,
0
),
1
)
||
register_chrdev_region
(
MKDEV
(
TTYAUX_MAJOR
,
0
),
1
,
"/dev/tty"
)
<
0
)
register_chrdev_region
(
MKDEV
(
TTYAUX_MAJOR
,
0
),
1
,
"/dev/tty"
)
<
0
)
...
@@ -2422,7 +2418,6 @@ static int __init tty_init(void)
...
@@ -2422,7 +2418,6 @@ static int __init tty_init(void)
devfs_mk_cdev
(
MKDEV
(
TTYAUX_MAJOR
,
0
),
S_IFCHR
|
S_IRUGO
|
S_IWUGO
,
"tty"
);
devfs_mk_cdev
(
MKDEV
(
TTYAUX_MAJOR
,
0
),
S_IFCHR
|
S_IRUGO
|
S_IWUGO
,
"tty"
);
class_simple_device_add
(
tty_class
,
MKDEV
(
TTYAUX_MAJOR
,
0
),
NULL
,
"tty"
);
class_simple_device_add
(
tty_class
,
MKDEV
(
TTYAUX_MAJOR
,
0
),
NULL
,
"tty"
);
cdev_set_name
(
&
console_cdev
,
"dev.console"
);
cdev_init
(
&
console_cdev
,
&
console_fops
);
cdev_init
(
&
console_cdev
,
&
console_fops
);
if
(
cdev_add
(
&
console_cdev
,
MKDEV
(
TTYAUX_MAJOR
,
1
),
1
)
||
if
(
cdev_add
(
&
console_cdev
,
MKDEV
(
TTYAUX_MAJOR
,
1
),
1
)
||
register_chrdev_region
(
MKDEV
(
TTYAUX_MAJOR
,
1
),
1
,
"/dev/console"
)
<
0
)
register_chrdev_region
(
MKDEV
(
TTYAUX_MAJOR
,
1
),
1
,
"/dev/console"
)
<
0
)
...
@@ -2431,7 +2426,6 @@ static int __init tty_init(void)
...
@@ -2431,7 +2426,6 @@ static int __init tty_init(void)
class_simple_device_add
(
tty_class
,
MKDEV
(
TTYAUX_MAJOR
,
1
),
NULL
,
"console"
);
class_simple_device_add
(
tty_class
,
MKDEV
(
TTYAUX_MAJOR
,
1
),
NULL
,
"console"
);
#ifdef CONFIG_UNIX98_PTYS
#ifdef CONFIG_UNIX98_PTYS
cdev_set_name
(
&
ptmx_cdev
,
"dev.ptmx"
);
cdev_init
(
&
ptmx_cdev
,
&
tty_fops
);
cdev_init
(
&
ptmx_cdev
,
&
tty_fops
);
if
(
cdev_add
(
&
ptmx_cdev
,
MKDEV
(
TTYAUX_MAJOR
,
2
),
1
)
||
if
(
cdev_add
(
&
ptmx_cdev
,
MKDEV
(
TTYAUX_MAJOR
,
2
),
1
)
||
register_chrdev_region
(
MKDEV
(
TTYAUX_MAJOR
,
2
),
1
,
"/dev/ptmx"
)
<
0
)
register_chrdev_region
(
MKDEV
(
TTYAUX_MAJOR
,
2
),
1
,
"/dev/ptmx"
)
<
0
)
...
@@ -2441,7 +2435,6 @@ static int __init tty_init(void)
...
@@ -2441,7 +2435,6 @@ static int __init tty_init(void)
#endif
#endif
#ifdef CONFIG_VT
#ifdef CONFIG_VT
cdev_set_name
(
&
vc0_cdev
,
"dev.vc0"
);
cdev_init
(
&
vc0_cdev
,
&
console_fops
);
cdev_init
(
&
vc0_cdev
,
&
console_fops
);
if
(
cdev_add
(
&
vc0_cdev
,
MKDEV
(
TTY_MAJOR
,
0
),
1
)
||
if
(
cdev_add
(
&
vc0_cdev
,
MKDEV
(
TTY_MAJOR
,
0
),
1
)
||
register_chrdev_region
(
MKDEV
(
TTY_MAJOR
,
0
),
1
,
"/dev/vc/0"
)
<
0
)
register_chrdev_region
(
MKDEV
(
TTY_MAJOR
,
0
),
1
,
"/dev/vc/0"
)
<
0
)
...
...
drivers/ieee1394/amdtp.c
View file @
e431f12e
...
@@ -1266,7 +1266,6 @@ static int __init amdtp_init_module (void)
...
@@ -1266,7 +1266,6 @@ static int __init amdtp_init_module (void)
{
{
cdev_init
(
&
amdtp_cdev
,
&
amdtp_fops
);
cdev_init
(
&
amdtp_cdev
,
&
amdtp_fops
);
amdtp_cdev
.
owner
=
THIS_MODULE
;
amdtp_cdev
.
owner
=
THIS_MODULE
;
cdev_set_name
(
&
amdtp_cdev
,
"amdtp"
);
if
(
cdev_add
(
&
amdtp_cdev
,
IEEE1394_AMDTP_DEV
,
16
))
{
if
(
cdev_add
(
&
amdtp_cdev
,
IEEE1394_AMDTP_DEV
,
16
))
{
HPSB_ERR
(
"amdtp: unable to add char device"
);
HPSB_ERR
(
"amdtp: unable to add char device"
);
return
-
EIO
;
return
-
EIO
;
...
...
drivers/ieee1394/dv1394.c
View file @
e431f12e
...
@@ -2616,7 +2616,6 @@ static int __init dv1394_init_module(void)
...
@@ -2616,7 +2616,6 @@ static int __init dv1394_init_module(void)
cdev_init
(
&
dv1394_cdev
,
&
dv1394_fops
);
cdev_init
(
&
dv1394_cdev
,
&
dv1394_fops
);
dv1394_cdev
.
owner
=
THIS_MODULE
;
dv1394_cdev
.
owner
=
THIS_MODULE
;
cdev_set_name
(
&
dv1394_cdev
,
"dv1394"
);
ret
=
cdev_add
(
&
dv1394_cdev
,
IEEE1394_DV1394_DEV
,
16
);
ret
=
cdev_add
(
&
dv1394_cdev
,
IEEE1394_DV1394_DEV
,
16
);
if
(
ret
)
{
if
(
ret
)
{
printk
(
KERN_ERR
"dv1394: unable to register character device
\n
"
);
printk
(
KERN_ERR
"dv1394: unable to register character device
\n
"
);
...
...
drivers/ieee1394/raw1394.c
View file @
e431f12e
...
@@ -2746,7 +2746,6 @@ static int __init init_raw1394(void)
...
@@ -2746,7 +2746,6 @@ static int __init init_raw1394(void)
cdev_init
(
&
raw1394_cdev
,
&
raw1394_fops
);
cdev_init
(
&
raw1394_cdev
,
&
raw1394_fops
);
raw1394_cdev
.
owner
=
THIS_MODULE
;
raw1394_cdev
.
owner
=
THIS_MODULE
;
cdev_set_name
(
&
raw1394_cdev
,
RAW1394_DEVICE_NAME
);
ret
=
cdev_add
(
&
raw1394_cdev
,
IEEE1394_RAW1394_DEV
,
1
);
ret
=
cdev_add
(
&
raw1394_cdev
,
IEEE1394_RAW1394_DEV
,
1
);
if
(
ret
)
{
if
(
ret
)
{
/* jmc: leaves reference to (static) raw1394_cdev */
/* jmc: leaves reference to (static) raw1394_cdev */
...
...
drivers/ieee1394/video1394.c
View file @
e431f12e
...
@@ -1457,7 +1457,6 @@ static int __init video1394_init_module (void)
...
@@ -1457,7 +1457,6 @@ static int __init video1394_init_module (void)
cdev_init
(
&
video1394_cdev
,
&
video1394_fops
);
cdev_init
(
&
video1394_cdev
,
&
video1394_fops
);
video1394_cdev
.
owner
=
THIS_MODULE
;
video1394_cdev
.
owner
=
THIS_MODULE
;
cdev_set_name
(
&
video1394_cdev
,
VIDEO1394_DRIVER_NAME
);
ret
=
cdev_add
(
&
video1394_cdev
,
IEEE1394_VIDEO1394_DEV
,
16
);
ret
=
cdev_add
(
&
video1394_cdev
,
IEEE1394_VIDEO1394_DEV
,
16
);
if
(
ret
)
{
if
(
ret
)
{
PRINT_G
(
KERN_ERR
,
"video1394: unable to get minor device block"
);
PRINT_G
(
KERN_ERR
,
"video1394: unable to get minor device block"
);
...
...
drivers/s390/char/tape_class.c
View file @
e431f12e
...
@@ -46,9 +46,6 @@ struct cdev *register_tape_dev(
...
@@ -46,9 +46,6 @@ struct cdev *register_tape_dev(
cdev
->
owner
=
fops
->
owner
;
cdev
->
owner
=
fops
->
owner
;
cdev
->
ops
=
fops
;
cdev
->
ops
=
fops
;
cdev
->
dev
=
dev
;
cdev
->
dev
=
dev
;
cdev_set_name
(
cdev
,
devname
);
for
(
s
=
strchr
(
cdev
->
kobj
.
name
,
'/'
);
s
;
s
=
strchr
(
s
,
'/'
))
*
s
=
'!'
;
rc
=
cdev_add
(
cdev
,
cdev
->
dev
,
1
);
rc
=
cdev_add
(
cdev
,
cdev
->
dev
,
1
);
if
(
rc
)
{
if
(
rc
)
{
...
...
drivers/scsi/sg.c
View file @
e431f12e
...
@@ -1409,7 +1409,6 @@ sg_add(struct class_device *cl_dev)
...
@@ -1409,7 +1409,6 @@ sg_add(struct class_device *cl_dev)
SCSI_LOG_TIMEOUT
(
3
,
printk
(
"sg_add: dev=%d
\n
"
,
k
));
SCSI_LOG_TIMEOUT
(
3
,
printk
(
"sg_add: dev=%d
\n
"
,
k
));
memset
(
sdp
,
0
,
sizeof
(
*
sdp
));
memset
(
sdp
,
0
,
sizeof
(
*
sdp
));
sprintf
(
disk
->
disk_name
,
"sg%d"
,
k
);
sprintf
(
disk
->
disk_name
,
"sg%d"
,
k
);
cdev_set_name
(
cdev
,
disk
->
disk_name
);
cdev
->
owner
=
THIS_MODULE
;
cdev
->
owner
=
THIS_MODULE
;
cdev
->
ops
=
&
sg_fops
;
cdev
->
ops
=
&
sg_fops
;
disk
->
major
=
SCSI_GENERIC_MAJOR
;
disk
->
major
=
SCSI_GENERIC_MAJOR
;
...
...
drivers/scsi/st.c
View file @
e431f12e
...
@@ -3888,7 +3888,6 @@ static int st_probe(struct device *dev)
...
@@ -3888,7 +3888,6 @@ static int st_probe(struct device *dev)
dev_num
);
dev_num
);
goto
out_free_tape
;
goto
out_free_tape
;
}
}
cdev_set_name
(
cdev
,
"%sm%d%s"
,
disk
->
disk_name
,
mode
,
j
?
"n"
:
""
);
cdev
->
owner
=
THIS_MODULE
;
cdev
->
owner
=
THIS_MODULE
;
cdev
->
ops
=
&
st_fops
;
cdev
->
ops
=
&
st_fops
;
...
...
include/linux/cdev.h
View file @
e431f12e
...
@@ -25,7 +25,5 @@ void cdev_del(struct cdev *);
...
@@ -25,7 +25,5 @@ void cdev_del(struct cdev *);
void
cd_forget
(
struct
inode
*
);
void
cd_forget
(
struct
inode
*
);
#define cdev_set_name(cdev, args...) kobject_set_name(&((cdev)->kobj), ##args)
#endif
#endif
#endif
#endif
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