diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:32 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:32 -0400 |
commit | 39375853d77bea48b7b334daa3698277af8d33f4 (patch) | |
tree | baba0e374b4af037abb8a516f71f48dff3f4ab33 | |
parent | e3d9a73a83d98fc466dabdcfe4f4e7e4419e3f8e (diff) |
ide: move smart_enable() call out from get_smart_data()
Move smart_enable() call out from get_smart_data() to
proc_idedisk_read_smart().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/ide-disk_proc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ide/ide-disk_proc.c b/drivers/ide/ide-disk_proc.c index 1f86dcbd2b1c..5766c1f62ad2 100644 --- a/drivers/ide/ide-disk_proc.c +++ b/drivers/ide/ide-disk_proc.c | |||
@@ -31,7 +31,7 @@ static int get_smart_data(ide_drive_t *drive, u8 *buf, u8 sub_cmd) | |||
31 | tf->command = ATA_CMD_SMART; | 31 | tf->command = ATA_CMD_SMART; |
32 | args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 32 | args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
33 | args.data_phase = TASKFILE_IN; | 33 | args.data_phase = TASKFILE_IN; |
34 | (void) smart_enable(drive); | 34 | |
35 | return ide_raw_taskfile(drive, &args, buf, 1); | 35 | return ide_raw_taskfile(drive, &args, buf, 1); |
36 | } | 36 | } |
37 | 37 | ||
@@ -67,6 +67,8 @@ static int proc_idedisk_read_smart(char *page, char **start, off_t off, | |||
67 | ide_drive_t *drive = (ide_drive_t *)data; | 67 | ide_drive_t *drive = (ide_drive_t *)data; |
68 | int len = 0, i = 0; | 68 | int len = 0, i = 0; |
69 | 69 | ||
70 | (void)smart_enable(drive); | ||
71 | |||
70 | if (get_smart_data(drive, page, sub_cmd) == 0) { | 72 | if (get_smart_data(drive, page, sub_cmd) == 0) { |
71 | unsigned short *val = (unsigned short *) page; | 73 | unsigned short *val = (unsigned short *) page; |
72 | char *out = (char *)val + SECTOR_SIZE; | 74 | char *out = (char *)val + SECTOR_SIZE; |