diff options
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 038980be763d..9dd331bc29b0 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -636,7 +636,7 @@ static int aac_cfg_open(struct inode *inode, struct file *file) | |||
636 | static int aac_cfg_ioctl(struct inode *inode, struct file *file, | 636 | static int aac_cfg_ioctl(struct inode *inode, struct file *file, |
637 | unsigned int cmd, unsigned long arg) | 637 | unsigned int cmd, unsigned long arg) |
638 | { | 638 | { |
639 | if (!capable(CAP_SYS_ADMIN)) | 639 | if (!capable(CAP_SYS_RAWIO)) |
640 | return -EPERM; | 640 | return -EPERM; |
641 | return aac_do_ioctl(file->private_data, cmd, (void __user *)arg); | 641 | return aac_do_ioctl(file->private_data, cmd, (void __user *)arg); |
642 | } | 642 | } |
@@ -691,7 +691,7 @@ static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) | |||
691 | 691 | ||
692 | static long aac_compat_cfg_ioctl(struct file *file, unsigned cmd, unsigned long arg) | 692 | static long aac_compat_cfg_ioctl(struct file *file, unsigned cmd, unsigned long arg) |
693 | { | 693 | { |
694 | if (!capable(CAP_SYS_ADMIN)) | 694 | if (!capable(CAP_SYS_RAWIO)) |
695 | return -EPERM; | 695 | return -EPERM; |
696 | return aac_compat_do_ioctl((struct aac_dev *)file->private_data, cmd, arg); | 696 | return aac_compat_do_ioctl((struct aac_dev *)file->private_data, cmd, arg); |
697 | } | 697 | } |
@@ -950,7 +950,8 @@ static struct scsi_host_template aac_driver_template = { | |||
950 | 950 | ||
951 | static void __aac_shutdown(struct aac_dev * aac) | 951 | static void __aac_shutdown(struct aac_dev * aac) |
952 | { | 952 | { |
953 | kthread_stop(aac->thread); | 953 | if (aac->aif_thread) |
954 | kthread_stop(aac->thread); | ||
954 | aac_send_shutdown(aac); | 955 | aac_send_shutdown(aac); |
955 | aac_adapter_disable_int(aac); | 956 | aac_adapter_disable_int(aac); |
956 | free_irq(aac->pdev->irq, aac); | 957 | free_irq(aac->pdev->irq, aac); |