]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: move smart_enable() call out from get_smart_data()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:32 +0000 (12:46 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:32 +0000 (12:46 +0100)
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>
drivers/ide/ide-disk_proc.c

index 1f86dcbd2b1c83c00eb68ccb6f8ca62164445c63..5766c1f62ad2abd7964bedd4804ba6b86d77a74f 100644 (file)
@@ -31,7 +31,7 @@ static int get_smart_data(ide_drive_t *drive, u8 *buf, u8 sub_cmd)
        tf->command = ATA_CMD_SMART;
        args.tf_flags   = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
        args.data_phase = TASKFILE_IN;
-       (void) smart_enable(drive);
+
        return ide_raw_taskfile(drive, &args, buf, 1);
 }
 
@@ -67,6 +67,8 @@ static int proc_idedisk_read_smart(char *page, char **start, off_t off,
        ide_drive_t     *drive = (ide_drive_t *)data;
        int             len = 0, i = 0;
 
+       (void)smart_enable(drive);
+
        if (get_smart_data(drive, page, sub_cmd) == 0) {
                unsigned short *val = (unsigned short *) page;
                char *out = (char *)val + SECTOR_SIZE;