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
28614ba4
Commit
28614ba4
authored
Mar 23, 2003
by
Christoph Hellwig
Committed by
Linus Torvalds
Mar 23, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] misc devfs_register cleanups
Avoid a bunch of non-NULL first arguments.
parent
3736e632
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
19 deletions
+20
-19
arch/um/drivers/ubd_kern.c
arch/um/drivers/ubd_kern.c
+3
-3
drivers/block/swim3.c
drivers/block/swim3.c
+3
-3
drivers/char/ipmi/ipmi_devintf.c
drivers/char/ipmi/ipmi_devintf.c
+3
-4
drivers/ieee1394/video1394.c
drivers/ieee1394/video1394.c
+3
-3
drivers/s390/block/dasd.c
drivers/s390/block/dasd.c
+4
-1
drivers/s390/char/tubfs.c
drivers/s390/char/tubfs.c
+1
-2
drivers/usb/input/hiddev.c
drivers/usb/input/hiddev.c
+3
-3
No files found.
arch/um/drivers/ubd_kern.c
View file @
28614ba4
...
...
@@ -488,7 +488,7 @@ static int ubd_new_disk(int major, u64 size, char *name, int unit,
struct
gendisk
**
disk_out
,
devfs_handle_t
dir_handle
,
devfs_handle_t
*
handle_out
)
{
char
devfs_name
[
sizeof
(
"nnnnnn
\0
"
)];
char
devfs_name
[
sizeof
(
"
ubd/
nnnnnn
\0
"
)];
struct
gendisk
*
disk
;
int
minor
=
unit
<<
UBD_SHIFT
;
...
...
@@ -505,8 +505,8 @@ static int ubd_new_disk(int major, u64 size, char *name, int unit,
*
disk_out
=
disk
;
/* /dev/ubd/N style names */
sprintf
(
devfs_name
,
"%d"
,
unit
);
*
handle_out
=
devfs_register
(
dir_handle
,
devfs_name
,
sprintf
(
devfs_name
,
"
ubd/
%d"
,
unit
);
*
handle_out
=
devfs_register
(
NULL
,
devfs_name
,
0
,
major
,
minor
,
S_IFBLK
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
,
&
ubd_blops
,
NULL
);
...
...
drivers/block/swim3.c
View file @
28614ba4
...
...
@@ -1095,9 +1095,9 @@ static int swim3_add_device(struct device_node *swim)
printk
(
KERN_INFO
"fd%d: SWIM3 floppy controller %s
\n
"
,
floppy_count
,
mediabay
?
"in media bay"
:
""
);
sprintf
(
floppy_name
,
"%s%d"
,
floppy_devfs_handle
?
""
:
"floppy"
,
floppy_count
);
floppy_handle
=
devfs_register
(
floppy_devfs_handle
,
floppy_name
,
sprintf
(
floppy_name
,
"floppy/%d"
,
floppy_count
);
floppy_handle
=
devfs_register
(
NULL
,
floppy_name
,
DEVFS_FL_DEFAULT
,
FLOPPY_MAJOR
,
floppy_count
,
S_IFBLK
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
,
&
floppy_fops
,
NULL
);
...
...
drivers/char/ipmi/ipmi_devintf.c
View file @
28614ba4
...
...
@@ -444,15 +444,14 @@ static devfs_handle_t handles[MAX_DEVICES];
static
void
ipmi_new_smi
(
int
if_num
)
{
char
name
[
2
];
char
name
[
10
];
if
(
if_num
>
MAX_DEVICES
)
return
;
name
[
0
]
=
if_num
+
'0'
;
name
[
1
]
=
'\0'
;
snprinf
(
name
,
sizeof
(
name
),
"ipmidev/%d"
,
if_num
);
handles
[
if_num
]
=
devfs_register
(
devfs_handle
,
name
,
DEVFS_FL_NONE
,
handles
[
if_num
]
=
devfs_register
(
NULL
,
name
,
DEVFS_FL_NONE
,
ipmi_major
,
if_num
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
ipmi_fops
,
NULL
);
...
...
drivers/ieee1394/video1394.c
View file @
28614ba4
...
...
@@ -1251,7 +1251,7 @@ static int video1394_init(struct ti_ohci *ohci)
{
struct
video_card
*
video
;
unsigned
long
flags
;
char
name
[
16
];
char
name
[
24
];
int
minor
;
video
=
kmalloc
(
sizeof
(
struct
video_card
),
GFP_KERNEL
);
...
...
@@ -1270,9 +1270,9 @@ static int video1394_init(struct ti_ohci *ohci)
video
->
id
=
ohci
->
id
;
video
->
ohci
=
ohci
;
sprintf
(
name
,
"%
d"
,
video
->
id
);
sprintf
(
name
,
"%
s/%d"
,
VIDEO1394_DRIVER_NAME
,
video
->
id
);
minor
=
IEEE1394_MINOR_BLOCK_VIDEO1394
*
16
+
video
->
id
;
video
->
devfs
=
devfs_register
(
devfs_handle
,
name
,
DEVFS_FL_DEFAULT
,
video
->
devfs
=
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
IEEE1394_MAJOR
,
minor
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
video1394_fops
,
NULL
);
...
...
drivers/s390/block/dasd.c
View file @
28614ba4
...
...
@@ -178,6 +178,7 @@ dasd_state_new_to_known(dasd_device_t *device)
umode_t
devfs_perm
;
devfs_handle_t
dir
;
int
major
,
minor
;
char
buf
[
20
];
/* Increase reference count of bdev. */
if
(
bdget
(
MKDEV
(
device
->
gdp
->
major
,
device
->
gdp
->
first_minor
))
==
NULL
)
...
...
@@ -198,7 +199,9 @@ dasd_state_new_to_known(dasd_device_t *device)
devfs_perm
=
S_IFBLK
|
S_IRUSR
;
else
devfs_perm
=
S_IFBLK
|
S_IRUSR
|
S_IWUSR
;
device
->
devfs_entry
=
devfs_register
(
dir
,
"device"
,
DEVFS_FL_DEFAULT
,
snprintf
(
buf
,
sizeof
(
buf
),
"dasd/%04x/device"
,
device
->
devno
);
device
->
devfs_entry
=
devfs_register
(
NULL
,
buf
,
0
,
major
,
minor
<<
DASD_PARTN_BITS
,
devfs_perm
,
&
dasd_device_operations
,
NULL
);
...
...
drivers/s390/char/tubfs.c
View file @
28614ba4
...
...
@@ -74,8 +74,7 @@ fs3270_init(void)
}
#ifdef CONFIG_DEVFS_FS
fs3270_devfs_dir
=
devfs_mk_dir
(
"3270"
);
fs3270_devfs_tub
=
devfs_register
(
fs3270_devfs_dir
,
"tub"
,
DEVFS_FL_DEFAULT
,
fs3270_devfs_tub
=
devfs_register
(
NULL
,
"3270/tub"
,
0
,
IBM_FS3270_MAJOR
,
0
,
S_IFCHR
|
S_IRUGO
|
S_IWUGO
,
&
fs3270_fops
,
NULL
);
...
...
drivers/usb/input/hiddev.c
View file @
28614ba4
...
...
@@ -684,7 +684,7 @@ int hiddev_connect(struct hid_device *hid)
struct
hiddev
*
hiddev
;
int
minor
,
i
;
int
retval
;
char
devfs_name
[
16
];
char
devfs_name
[
24
];
for
(
i
=
0
;
i
<
hid
->
maxcollection
;
i
++
)
if
(
hid
->
collection
[
i
].
type
==
...
...
@@ -715,8 +715,8 @@ int hiddev_connect(struct hid_device *hid)
hiddev
->
hid
=
hid
;
hiddev
->
exist
=
1
;
sprintf
(
devfs_name
,
"hiddev%d"
,
minor
);
hiddev
->
devfs
=
devfs_register
(
hiddev_devfs_handle
,
devfs_name
,
sprintf
(
devfs_name
,
"
usb/hid/
hiddev%d"
,
minor
);
hiddev
->
devfs
=
devfs_register
(
NULL
,
devfs_name
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
minor
+
HIDDEV_MINOR_BASE
,
S_IFCHR
|
S_IRUGO
|
S_IWUSR
,
&
hiddev_fops
,
NULL
);
hid
->
minor
=
minor
;
...
...
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