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
56cb7007
Commit
56cb7007
authored
Jun 25, 2003
by
James Bottomley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add remove method to lasi700.c
parent
6d577352
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
22 deletions
+24
-22
drivers/scsi/lasi700.c
drivers/scsi/lasi700.c
+23
-20
drivers/scsi/lasi700.h
drivers/scsi/lasi700.h
+1
-2
No files found.
drivers/scsi/lasi700.c
View file @
56cb7007
...
...
@@ -76,6 +76,7 @@ static struct parisc_driver lasi700_driver = {
.
name
=
"Lasi SCSI"
,
.
id_table
=
lasi700_scsi_tbl
,
.
probe
=
lasi700_driver_callback
,
.
remove
=
__devexit_p
(
lasi700_driver_remove
),
};
static
int
__init
...
...
@@ -97,12 +98,6 @@ lasi700_driver_callback(struct parisc_device *dev)
}
memset
(
hostdata
,
0
,
sizeof
(
struct
NCR_700_Host_Parameters
));
if
(
!
request_mem_region
(
base
,
64
,
dev
->
dev
.
name
))
{
printk
(
KERN_ERR
"%s: Failed to claim memory region
\n
"
,
dev
->
dev
.
name
);
goto
out_kfree
;
}
hostdata
->
dev
=
&
dev
->
dev
;
dma_set_mask
(
&
dev
->
dev
,
0xffffffffUL
);
hostdata
->
base
=
base
;
...
...
@@ -122,7 +117,7 @@ lasi700_driver_callback(struct parisc_device *dev)
host
=
NCR_700_detect
(
&
lasi700_template
,
hostdata
);
if
(
!
host
)
goto
out_
release_mem_region
;
goto
out_
kfree
;
host
->
irq
=
dev
->
irq
;
if
(
request_irq
(
dev
->
irq
,
NCR_700_intr
,
SA_SHIRQ
,
...
...
@@ -132,33 +127,33 @@ lasi700_driver_callback(struct parisc_device *dev)
goto
out_put_host
;
}
dev_set_drvdata
(
&
dev
->
dev
,
host
);
scsi_add_host
(
host
,
&
dev
->
dev
);
return
0
;
out_put_host:
scsi_host_put
(
host
);
out_release_mem_region:
release_mem_region
(
base
,
64
);
out_kfree:
kfree
(
hostdata
);
return
1
;
return
-
ENODEV
;
}
#if 0
static int
lasi700_release(struct Scsi_Host *host)
static
int
__exit
lasi700_driver_remove
(
struct
parisc_device
*
dev
)
{
struct D700_Host_Parameters *hostdata =
(struct D700_Host_Parameters *)host->hostdata[0];
struct
Scsi_Host
*
host
=
dev_get_drvdata
(
&
dev
->
dev
);
struct
NCR_700_Host_Parameters
*
hostdata
=
(
struct
NCR_700_Host_Parameters
*
)
host
->
hostdata
[
0
];
scsi_remove_host
(
host
);
NCR_700_release
(
host
);
kfree(hostdata);
free_irq
(
host
->
irq
,
host
);
release_mem_region(host->base, 64
);
unregister_parisc_driver(&lasi700_driver);
return
1
;
kfree
(
hostdata
);
return
0
;
}
#endif
static
int
__init
lasi700_init
(
void
)
...
...
@@ -166,4 +161,12 @@ lasi700_init(void)
return
register_parisc_driver
(
&
lasi700_driver
);
}
static
void
__exit
lasi700_exit
(
void
)
{
unregister_parisc_driver
(
&
lasi700_driver
);
scsi_sysfs_release_attributes
(
&
lasi700_template
);
}
module_init
(
lasi700_init
);
module_exit
(
lasi700_exit
);
drivers/scsi/lasi700.h
View file @
56cb7007
...
...
@@ -25,9 +25,8 @@
#ifndef _LASI700_H
#define _LASI700_H
static
int
lasi700_detect
(
Scsi_Host_Template
*
);
static
int
lasi700_driver_callback
(
struct
parisc_device
*
dev
);
static
int
lasi700_
release
(
struct
Scsi_Host
*
host
);
static
int
lasi700_
driver_remove
(
struct
parisc_device
*
dev
);
#define LASI_710_SVERSION 0x082
#define LASI_700_SVERSION 0x071
...
...
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