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
81780a58
Commit
81780a58
authored
Nov 14, 2002
by
Alexander Viro
Committed by
Jens Axboe
Nov 14, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] cleaned up callers of devfs_mk_dir()
parent
f350db2c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
14 deletions
+12
-14
drivers/cdrom/sbpcd.c
drivers/cdrom/sbpcd.c
+2
-2
drivers/ide/ide-probe.c
drivers/ide/ide-probe.c
+2
-3
drivers/media/dvb/dvb-core/dvbdev.c
drivers/media/dvb/dvb-core/dvbdev.c
+3
-3
drivers/s390/block/dasd.c
drivers/s390/block/dasd.c
+3
-3
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_scan.c
+2
-3
No files found.
drivers/cdrom/sbpcd.c
View file @
81780a58
...
@@ -5871,8 +5871,8 @@ int __init sbpcd_init(void)
...
@@ -5871,8 +5871,8 @@ int __init sbpcd_init(void)
disk
->
fops
=
&
sbpcd_bdops
;
disk
->
fops
=
&
sbpcd_bdops
;
strcpy
(
disk
->
disk_name
,
sbpcd_infop
->
name
);
strcpy
(
disk
->
disk_name
,
sbpcd_infop
->
name
);
disk
->
flags
=
GENHD_FL_CD
;
disk
->
flags
=
GENHD_FL_CD
;
sprintf
(
nbuff
,
"c0t%d"
,
p
->
drv_id
);
sprintf
(
nbuff
,
"
sbp/
c0t%d"
,
p
->
drv_id
);
disk
->
de
=
devfs_mk_dir
(
devfs_handle
,
nbuff
,
NULL
);
disk
->
de
=
devfs_mk_dir
(
NULL
,
nbuff
,
NULL
);
p
->
disk
=
disk
;
p
->
disk
=
disk
;
if
(
register_cdrom
(
sbpcd_infop
))
if
(
register_cdrom
(
sbpcd_infop
))
{
{
...
...
drivers/ide/ide-probe.c
View file @
81780a58
...
@@ -1047,7 +1047,6 @@ static int alloc_disks(ide_hwif_t *hwif)
...
@@ -1047,7 +1047,6 @@ static int alloc_disks(ide_hwif_t *hwif)
static
void
init_gendisk
(
ide_hwif_t
*
hwif
)
static
void
init_gendisk
(
ide_hwif_t
*
hwif
)
{
{
unsigned
int
unit
;
unsigned
int
unit
;
extern
devfs_handle_t
ide_devfs_handle
;
for
(
unit
=
0
;
unit
<
MAX_DRIVES
;
++
unit
)
{
for
(
unit
=
0
;
unit
<
MAX_DRIVES
;
++
unit
)
{
ide_drive_t
*
drive
=
&
hwif
->
drives
[
unit
];
ide_drive_t
*
drive
=
&
hwif
->
drives
[
unit
];
...
@@ -1059,13 +1058,13 @@ static void init_gendisk (ide_hwif_t *hwif)
...
@@ -1059,13 +1058,13 @@ static void init_gendisk (ide_hwif_t *hwif)
"%s"
,
"IDE Drive"
);
"%s"
,
"IDE Drive"
);
drive
->
gendev
.
parent
=
&
hwif
->
gendev
;
drive
->
gendev
.
parent
=
&
hwif
->
gendev
;
drive
->
gendev
.
bus
=
&
ide_bus_type
;
drive
->
gendev
.
bus
=
&
ide_bus_type
;
sprintf
(
name
,
"host%d/bus%d/target%d/lun%d"
,
sprintf
(
name
,
"
ide/
host%d/bus%d/target%d/lun%d"
,
(
hwif
->
channel
&&
hwif
->
mate
)
?
(
hwif
->
channel
&&
hwif
->
mate
)
?
hwif
->
mate
->
index
:
hwif
->
index
,
hwif
->
mate
->
index
:
hwif
->
index
,
hwif
->
channel
,
unit
,
drive
->
lun
);
hwif
->
channel
,
unit
,
drive
->
lun
);
if
(
drive
->
present
)
{
if
(
drive
->
present
)
{
device_register
(
&
drive
->
gendev
);
device_register
(
&
drive
->
gendev
);
drive
->
de
=
devfs_mk_dir
(
ide_devfs_handle
,
name
,
NULL
);
drive
->
de
=
devfs_mk_dir
(
NULL
,
name
,
NULL
);
}
}
}
}
blk_register_region
(
MKDEV
(
hwif
->
major
,
0
),
MAX_DRIVES
<<
PARTN_BITS
,
blk_register_region
(
MKDEV
(
hwif
->
major
,
0
),
MAX_DRIVES
<<
PARTN_BITS
,
...
...
drivers/media/dvb/dvb-core/dvbdev.c
View file @
81780a58
...
@@ -350,7 +350,7 @@ int dvbdev_get_free_adapter_num (void)
...
@@ -350,7 +350,7 @@ int dvbdev_get_free_adapter_num (void)
int
dvb_register_adapter
(
dvb_adapter_t
**
padap
,
char
*
name
)
int
dvb_register_adapter
(
dvb_adapter_t
**
padap
,
char
*
name
)
{
{
char
dirname
[
1
0
];
char
dirname
[
1
6
];
dvb_adapter_t
*
adap
;
dvb_adapter_t
*
adap
;
int
num
;
int
num
;
...
@@ -374,8 +374,8 @@ int dvb_register_adapter(dvb_adapter_t **padap, char *name)
...
@@ -374,8 +374,8 @@ int dvb_register_adapter(dvb_adapter_t **padap, char *name)
printk
(
"%s: registering new adapter (%s).
\n
"
,
__FUNCTION__
,
name
);
printk
(
"%s: registering new adapter (%s).
\n
"
,
__FUNCTION__
,
name
);
sprintf
(
dirname
,
"adapter%d"
,
num
);
sprintf
(
dirname
,
"
dvb/
adapter%d"
,
num
);
adap
->
devfs_handle
=
devfs_mk_dir
(
dvb_devfs_handle
,
dirname
,
NULL
);
adap
->
devfs_handle
=
devfs_mk_dir
(
NULL
,
dirname
,
NULL
);
adap
->
num
=
num
;
adap
->
num
=
num
;
list_add_tail
(
&
adap
->
list_head
,
&
dvb_adapter_list
);
list_add_tail
(
&
adap
->
list_head
,
&
dvb_adapter_list
);
...
...
drivers/s390/block/dasd.c
View file @
81780a58
...
@@ -283,7 +283,7 @@ dasd_free_device(dasd_device_t *device)
...
@@ -283,7 +283,7 @@ dasd_free_device(dasd_device_t *device)
static
inline
int
static
inline
int
dasd_state_new_to_known
(
dasd_device_t
*
device
)
dasd_state_new_to_known
(
dasd_device_t
*
device
)
{
{
char
buffer
[
5
];
char
buffer
[
10
];
dasd_devmap_t
*
devmap
;
dasd_devmap_t
*
devmap
;
umode_t
devfs_perm
;
umode_t
devfs_perm
;
devfs_handle_t
dir
;
devfs_handle_t
dir
;
...
@@ -303,8 +303,8 @@ dasd_state_new_to_known(dasd_device_t *device)
...
@@ -303,8 +303,8 @@ dasd_state_new_to_known(dasd_device_t *device)
return
rc
;
return
rc
;
/* Add a proc directory and the dasd device entry to devfs. */
/* Add a proc directory and the dasd device entry to devfs. */
sprintf
(
buffer
,
"%04x"
,
device
->
devinfo
.
devno
);
sprintf
(
buffer
,
"
dasd/
%04x"
,
device
->
devinfo
.
devno
);
dir
=
devfs_mk_dir
(
dasd_devfs_handle
,
buffer
,
device
);
dir
=
devfs_mk_dir
(
NULL
,
buffer
,
NULL
);
device
->
gdp
->
de
=
dir
;
device
->
gdp
->
de
=
dir
;
if
(
devmap
->
features
&
DASD_FEATURE_READONLY
)
if
(
devmap
->
features
&
DASD_FEATURE_READONLY
)
devfs_perm
=
S_IFBLK
|
S_IRUSR
;
devfs_perm
=
S_IFBLK
|
S_IRUSR
;
...
...
drivers/scsi/scsi_scan.c
View file @
81780a58
...
@@ -1323,7 +1323,6 @@ static int scsi_add_lun(Scsi_Device *sdevscan, Scsi_Device **sdevnew,
...
@@ -1323,7 +1323,6 @@ static int scsi_add_lun(Scsi_Device *sdevscan, Scsi_Device **sdevnew,
{
{
Scsi_Device
*
sdev
;
Scsi_Device
*
sdev
;
char
devname
[
64
];
char
devname
[
64
];
extern
devfs_handle_t
scsi_devfs_handle
;
sdev
=
scsi_alloc_sdev
(
sdevscan
->
host
,
sdevscan
->
channel
,
sdev
=
scsi_alloc_sdev
(
sdevscan
->
host
,
sdevscan
->
channel
,
sdevscan
->
id
,
sdevscan
->
lun
);
sdevscan
->
id
,
sdevscan
->
lun
);
...
@@ -1445,13 +1444,13 @@ static int scsi_add_lun(Scsi_Device *sdevscan, Scsi_Device **sdevnew,
...
@@ -1445,13 +1444,13 @@ static int scsi_add_lun(Scsi_Device *sdevscan, Scsi_Device **sdevnew,
*/
*/
device_create_file
(
&
sdev
->
sdev_driverfs_dev
,
&
dev_attr_type
);
device_create_file
(
&
sdev
->
sdev_driverfs_dev
,
&
dev_attr_type
);
sprintf
(
devname
,
"host%d/bus%d/target%d/lun%d"
,
sprintf
(
devname
,
"
scsi/
host%d/bus%d/target%d/lun%d"
,
sdev
->
host
->
host_no
,
sdev
->
channel
,
sdev
->
id
,
sdev
->
lun
);
sdev
->
host
->
host_no
,
sdev
->
channel
,
sdev
->
id
,
sdev
->
lun
);
if
(
sdev
->
de
)
if
(
sdev
->
de
)
printk
(
KERN_WARNING
"scsi devfs dir:
\"
%s
\"
already exists
\n
"
,
printk
(
KERN_WARNING
"scsi devfs dir:
\"
%s
\"
already exists
\n
"
,
devname
);
devname
);
else
else
sdev
->
de
=
devfs_mk_dir
(
scsi_devfs_handle
,
devname
,
NULL
);
sdev
->
de
=
devfs_mk_dir
(
NULL
,
devname
,
NULL
);
/*
/*
* End driverfs/devfs code.
* End driverfs/devfs code.
*/
*/
...
...
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