From: Stephen M. Cameron Date: Thu, 4 Feb 2010 14:43:51 +0000 (-0600) Subject: [SCSI] hpsa: Reorder compat ioctl functions to eliminate some forward declarations. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=71fe75a705aa4eabda23334095c382ad8c48f2d1;p=openwrt%2Fstaging%2Fblogic.git [SCSI] hpsa: Reorder compat ioctl functions to eliminate some forward declarations. Signed-off-by: Stephen M. Cameron Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 225a787dedf3..af20dbd62d49 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -2287,40 +2287,6 @@ static void cmd_special_free(struct ctlr_info *h, struct CommandList *c) #ifdef CONFIG_COMPAT -static int hpsa_ioctl32_passthru(struct scsi_device *dev, int cmd, void *arg); -static int hpsa_ioctl32_big_passthru(struct scsi_device *dev, - int cmd, void *arg); - -static int hpsa_compat_ioctl(struct scsi_device *dev, int cmd, void *arg) -{ - switch (cmd) { - case CCISS_GETPCIINFO: - case CCISS_GETINTINFO: - case CCISS_SETINTINFO: - case CCISS_GETNODENAME: - case CCISS_SETNODENAME: - case CCISS_GETHEARTBEAT: - case CCISS_GETBUSTYPES: - case CCISS_GETFIRMVER: - case CCISS_GETDRIVVER: - case CCISS_REVALIDVOLS: - case CCISS_DEREGDISK: - case CCISS_REGNEWDISK: - case CCISS_REGNEWD: - case CCISS_RESCANDISK: - case CCISS_GETLUNINFO: - return hpsa_ioctl(dev, cmd, arg); - - case CCISS_PASSTHRU32: - return hpsa_ioctl32_passthru(dev, cmd, arg); - case CCISS_BIG_PASSTHRU32: - return hpsa_ioctl32_big_passthru(dev, cmd, arg); - - default: - return -ENOIOCTLCMD; - } -} - static int hpsa_ioctl32_passthru(struct scsi_device *dev, int cmd, void *arg) { IOCTL32_Command_struct __user *arg32 = @@ -2391,6 +2357,36 @@ static int hpsa_ioctl32_big_passthru(struct scsi_device *dev, return -EFAULT; return err; } + +static int hpsa_compat_ioctl(struct scsi_device *dev, int cmd, void *arg) +{ + switch (cmd) { + case CCISS_GETPCIINFO: + case CCISS_GETINTINFO: + case CCISS_SETINTINFO: + case CCISS_GETNODENAME: + case CCISS_SETNODENAME: + case CCISS_GETHEARTBEAT: + case CCISS_GETBUSTYPES: + case CCISS_GETFIRMVER: + case CCISS_GETDRIVVER: + case CCISS_REVALIDVOLS: + case CCISS_DEREGDISK: + case CCISS_REGNEWDISK: + case CCISS_REGNEWD: + case CCISS_RESCANDISK: + case CCISS_GETLUNINFO: + return hpsa_ioctl(dev, cmd, arg); + + case CCISS_PASSTHRU32: + return hpsa_ioctl32_passthru(dev, cmd, arg); + case CCISS_BIG_PASSTHRU32: + return hpsa_ioctl32_big_passthru(dev, cmd, arg); + + default: + return -ENOIOCTLCMD; + } +} #endif static int hpsa_getpciinfo_ioctl(struct ctlr_info *h, void __user *argp)