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
9a815f1f
Commit
9a815f1f
authored
Dec 04, 2002
by
Christoph Hellwig
Committed by
Christoph Hellwig
Dec 04, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] remove remaining MAJOR_NR/DEVICE_NR junk
This was needed for blk.h in 2.4 but is entirely superflous in 2.5
parent
8b8c8712
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
13 deletions
+10
-13
drivers/scsi/osst.c
drivers/scsi/osst.c
+9
-9
drivers/scsi/st.c
drivers/scsi/st.c
+1
-4
No files found.
drivers/scsi/osst.c
View file @
9a815f1f
...
...
@@ -46,6 +46,7 @@ const char * osst_version = "0.99.0p3";
#include <linux/spinlock.h>
#include <linux/vmalloc.h>
#include <linux/version.h>
#include <linux/blk.h>
#include <asm/uaccess.h>
#include <asm/dma.h>
#include <asm/system.h>
...
...
@@ -59,8 +60,6 @@ const char * osst_version = "0.99.0p3";
in the drivers are more widely classified, this may be changed to KERN_DEBUG. */
#define OSST_DEB_MSG KERN_NOTICE
#define MAJOR_NR OSST_MAJOR
#include <linux/blk.h>
#include "scsi.h"
#include "hosts.h"
...
...
@@ -5586,14 +5585,14 @@ static int osst_attach(Scsi_Device * SDp)
tpnt
->
driverfs_dev_r
[
mode
].
parent
=
&
SDp
->
sdev_driverfs_dev
;
tpnt
->
driverfs_dev_r
[
mode
].
bus
=
SDp
->
sdev_driverfs_dev
.
bus
;
tpnt
->
driverfs_dev_r
[
mode
].
driver_data
=
(
void
*
)(
long
)
__mkdev
(
MAJOR_N
R
,
dev_num
+
(
mode
<<
5
));
(
void
*
)(
long
)
__mkdev
(
OSST_MAJO
R
,
dev_num
+
(
mode
<<
5
));
device_register
(
&
tpnt
->
driverfs_dev_r
[
mode
]);
device_create_file
(
&
tpnt
->
driverfs_dev_r
[
mode
],
&
dev_attr_type
);
device_create_file
(
&
tpnt
->
driverfs_dev_r
[
mode
],
&
dev_attr_kdev
);
tpnt
->
de_r
[
mode
]
=
devfs_register
(
SDp
->
de
,
name
,
DEVFS_FL_DEFAULT
,
MAJOR_N
R
,
dev_num
+
(
mode
<<
5
),
OSST_MAJO
R
,
dev_num
+
(
mode
<<
5
),
S_IFCHR
|
S_IRUGO
|
S_IWUGO
,
&
osst_fops
,
NULL
);
/* No-rewind entry */
...
...
@@ -5605,7 +5604,7 @@ static int osst_attach(Scsi_Device * SDp)
tpnt
->
driverfs_dev_n
[
mode
].
parent
=
&
SDp
->
sdev_driverfs_dev
;
tpnt
->
driverfs_dev_n
[
mode
].
bus
=
SDp
->
sdev_driverfs_dev
.
bus
;
tpnt
->
driverfs_dev_n
[
mode
].
driver_data
=
(
void
*
)(
long
)
__mkdev
(
MAJOR_N
R
,
dev_num
+
(
mode
<<
5
)
+
128
);
(
void
*
)(
long
)
__mkdev
(
OSST_MAJO
R
,
dev_num
+
(
mode
<<
5
)
+
128
);
device_register
(
&
tpnt
->
driverfs_dev_n
[
mode
]);
device_create_file
(
&
tpnt
->
driverfs_dev_n
[
mode
],
&
dev_attr_type
);
...
...
@@ -5613,7 +5612,7 @@ static int osst_attach(Scsi_Device * SDp)
&
dev_attr_kdev
);
tpnt
->
de_n
[
mode
]
=
devfs_register
(
SDp
->
de
,
name
,
DEVFS_FL_DEFAULT
,
MAJOR_N
R
,
dev_num
+
(
mode
<<
5
)
+
128
,
OSST_MAJO
R
,
dev_num
+
(
mode
<<
5
)
+
128
,
S_IFCHR
|
S_IRUGO
|
S_IWUGO
,
&
osst_fops
,
NULL
);
}
...
...
@@ -5686,8 +5685,9 @@ static int __init init_osst(void)
printk
(
OSST_DEB_MSG
"osst :D: %d s/g segments, write threshold %d bytes.
\n
"
,
max_sg_segs
,
osst_write_threshold
);
#endif
if
((
register_chrdev
(
MAJOR_NR
,
"osst"
,
&
osst_fops
)
<
0
)
||
scsi_register_device
(
&
osst_template
))
{
printk
(
KERN_ERR
"osst :E: Unable to register major %d for OnStream tapes
\n
"
,
MAJOR_NR
);
if
((
register_chrdev
(
OSST_MAJOR
,
"osst"
,
&
osst_fops
)
<
0
)
||
scsi_register_device
(
&
osst_template
))
{
printk
(
KERN_ERR
"osst :E: Unable to register major %d for OnStream tapes
\n
"
,
OSST_MAJOR
);
return
1
;
}
...
...
@@ -5700,7 +5700,7 @@ static void __exit exit_osst (void)
OS_Scsi_Tape
*
STp
;
scsi_unregister_device
(
&
osst_template
);
unregister_chrdev
(
MAJOR_N
R
,
"osst"
);
unregister_chrdev
(
OSST_MAJO
R
,
"osst"
);
if
(
os_scsi_tapes
)
{
for
(
i
=
0
;
i
<
osst_max_dev
;
++
i
)
{
...
...
drivers/scsi/st.c
View file @
9a815f1f
...
...
@@ -33,7 +33,7 @@ static char *verstr = "20021015";
#include <linux/ioctl.h>
#include <linux/fcntl.h>
#include <linux/spinlock.h>
#include <linux/
smp_loc
k.h>
#include <linux/
bl
k.h>
#include <asm/uaccess.h>
#include <asm/dma.h>
#include <asm/system.h>
...
...
@@ -54,9 +54,6 @@ static char *verstr = "20021015";
#define DEBC(a)
#endif
#define MAJOR_NR SCSI_TAPE_MAJOR
#define DEVICE_NR(device) (minor(device) & 0x7f)
#include <linux/blk.h>
#include "scsi.h"
#include "hosts.h"
...
...
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