Commit 299b7f6e authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] drivers/block/cciss*: misc cleanups

This patch contains the following cleanups:
- make some needlesly global code static
- cciss_scsi.c: remove the unused global function cciss_scsi_info
- cciss.c:
  - init_cciss_module -> cciss_init
  - cleanup_cciss_module -> cciss_cleanup
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 18891d81
...@@ -61,7 +61,7 @@ MODULE_LICENSE("GPL"); ...@@ -61,7 +61,7 @@ MODULE_LICENSE("GPL");
#include <linux/cciss_ioctl.h> #include <linux/cciss_ioctl.h>
/* define the PCI info for the cards we can control */ /* define the PCI info for the cards we can control */
const struct pci_device_id cciss_pci_device_id[] = { static const struct pci_device_id cciss_pci_device_id[] = {
{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISS, { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISS,
0x0E11, 0x4070, 0, 0, 0}, 0x0E11, 0x4070, 0, 0, 0},
{ PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSB, { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSB,
...@@ -2946,7 +2946,7 @@ static struct pci_driver cciss_pci_driver = { ...@@ -2946,7 +2946,7 @@ static struct pci_driver cciss_pci_driver = {
* This is it. Register the PCI driver information for the cards we control * This is it. Register the PCI driver information for the cards we control
* the OS will call our registered routines when it finds one of our cards. * the OS will call our registered routines when it finds one of our cards.
*/ */
int __init cciss_init(void) static int __init cciss_init(void)
{ {
printk(KERN_INFO DRIVER_NAME "\n"); printk(KERN_INFO DRIVER_NAME "\n");
...@@ -2954,12 +2954,7 @@ int __init cciss_init(void) ...@@ -2954,12 +2954,7 @@ int __init cciss_init(void)
return pci_module_init(&cciss_pci_driver); return pci_module_init(&cciss_pci_driver);
} }
static int __init init_cciss_module(void) static void __exit cciss_cleanup(void)
{
return ( cciss_init());
}
static void __exit cleanup_cciss_module(void)
{ {
int i; int i;
...@@ -2977,5 +2972,5 @@ static void __exit cleanup_cciss_module(void) ...@@ -2977,5 +2972,5 @@ static void __exit cleanup_cciss_module(void)
remove_proc_entry("cciss", proc_root_driver); remove_proc_entry("cciss", proc_root_driver);
} }
module_init(init_cciss_module); module_init(cciss_init);
module_exit(cleanup_cciss_module); module_exit(cciss_cleanup);
...@@ -53,9 +53,7 @@ static int sendcmd( ...@@ -53,9 +53,7 @@ static int sendcmd(
int cmd_type); int cmd_type);
const char *cciss_scsi_info(struct Scsi_Host *sa); static int cciss_scsi_proc_info(
int cciss_scsi_proc_info(
struct Scsi_Host *sh, struct Scsi_Host *sh,
char *buffer, /* data buffer */ char *buffer, /* data buffer */
char **start, /* where data in buffer starts */ char **start, /* where data in buffer starts */
...@@ -63,7 +61,7 @@ int cciss_scsi_proc_info( ...@@ -63,7 +61,7 @@ int cciss_scsi_proc_info(
int length, /* length of data in buffer */ int length, /* length of data in buffer */
int func); /* 0 == read, 1 == write */ int func); /* 0 == read, 1 == write */
int cciss_scsi_queue_command (struct scsi_cmnd *cmd, static int cciss_scsi_queue_command (struct scsi_cmnd *cmd,
void (* done)(struct scsi_cmnd *)); void (* done)(struct scsi_cmnd *));
static struct cciss_scsi_hba_t ccissscsi[MAX_CTLR] = { static struct cciss_scsi_hba_t ccissscsi[MAX_CTLR] = {
...@@ -717,8 +715,6 @@ cciss_scsi_detect(int ctlr) ...@@ -717,8 +715,6 @@ cciss_scsi_detect(int ctlr)
return 0; return 0;
} }
static void __exit cleanup_cciss_module(void);
static void static void
cciss_unmap_one(struct pci_dev *pdev, cciss_unmap_one(struct pci_dev *pdev,
CommandList_struct *cp, CommandList_struct *cp,
...@@ -1119,7 +1115,7 @@ cciss_scsi_user_command(int ctlr, int hostno, char *buffer, int length) ...@@ -1119,7 +1115,7 @@ cciss_scsi_user_command(int ctlr, int hostno, char *buffer, int length)
} }
int static int
cciss_scsi_proc_info(struct Scsi_Host *sh, cciss_scsi_proc_info(struct Scsi_Host *sh,
char *buffer, /* data buffer */ char *buffer, /* data buffer */
char **start, /* where data in buffer starts */ char **start, /* where data in buffer starts */
...@@ -1154,29 +1150,6 @@ cciss_scsi_proc_info(struct Scsi_Host *sh, ...@@ -1154,29 +1150,6 @@ cciss_scsi_proc_info(struct Scsi_Host *sh,
buffer, length); buffer, length);
} }
/* this is via the generic proc support */
const char *
cciss_scsi_info(struct Scsi_Host *sa)
{
static char buf[300];
ctlr_info_t *ci;
/* probably need to work on putting a bit more info in here... */
/* this is output via the /proc filesystem. */
ci = (ctlr_info_t *) sa->hostdata[0];
sprintf(buf, "%s %c%c%c%c\n",
ci->product_name,
ci->firm_ver[0],
ci->firm_ver[1],
ci->firm_ver[2],
ci->firm_ver[3]);
return buf;
}
/* cciss_scatter_gather takes a struct scsi_cmnd, (cmd), and does the pci /* cciss_scatter_gather takes a struct scsi_cmnd, (cmd), and does the pci
dma mapping and fills in the scatter gather entries of the dma mapping and fills in the scatter gather entries of the
cciss command, cp. */ cciss command, cp. */
...@@ -1230,7 +1203,7 @@ cciss_scatter_gather(struct pci_dev *pdev, ...@@ -1230,7 +1203,7 @@ cciss_scatter_gather(struct pci_dev *pdev,
} }
int static int
cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd *)) cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd *))
{ {
ctlr_info_t **c; ctlr_info_t **c;
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#define SCSI_CCISS_CAN_QUEUE 2 #define SCSI_CCISS_CAN_QUEUE 2
/* /*
info: cciss_scsi_info, \
Note, cmd_per_lun could give us some trouble, so I'm setting it very low. Note, cmd_per_lun could give us some trouble, so I'm setting it very low.
Likewise, SCSI_CCISS_CAN_QUEUE is set very conservatively. Likewise, SCSI_CCISS_CAN_QUEUE is set very conservatively.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment