summaryrefslogtreecommitdiff
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-26 23:50:35 +0300
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-26 23:50:35 +0300
commitdbecebca1914f414008553b57aefde95b70f9142 (patch)
treec575048feff3070053ef7343e5912d264e2cc291 /drivers/ide/ide.c
parentbcd88ac3b2ff2eae3d0fa57a6b02d4fce5392f32 (diff)
downloadlinux-dbecebca1914f414008553b57aefde95b70f9142.tar.xz
ide: fix sparse warning about shadowing 'flags' symbol
drivers/ide/ide.c:801:18: warning: symbol 'flags' shadows an earlier one drivers/ide/ide.c:732:16: originally declared here Also fix some whitespace damage while at it. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 300536697622..fa16bc30bbc9 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1031,10 +1031,9 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
drive->nice1 = (arg >> IDE_NICE_1) & 1;
return 0;
case HDIO_DRIVE_RESET:
- {
- unsigned long flags;
- if (!capable(CAP_SYS_ADMIN)) return -EACCES;
-
+ if (!capable(CAP_SYS_ADMIN))
+ return -EACCES;
+
/*
* Abort the current command on the
* group if there is one, taking
@@ -1053,17 +1052,15 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
ide_abort(drive, "drive reset");
BUG_ON(HWGROUP(drive)->handler);
-
+
/* Ensure nothing gets queued after we
drop the lock. Reset will clear the busy */
-
+
HWGROUP(drive)->busy = 1;
spin_unlock_irqrestore(&ide_lock, flags);
(void) ide_do_reset(drive);
return 0;
- }
-
case HDIO_GET_BUSSTATE:
if (!capable(CAP_SYS_ADMIN))
return -EACCES;