diff options
author | Borislav Petkov <petkovbb@googlemail.com> | 2008-02-05 20:57:52 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-05 20:57:52 -0500 |
commit | 41f81d545b6b1f585a02d1d8545978714f710e91 (patch) | |
tree | 421b1e4a5e61c063e7b2fa82c6b9ee932ffcffa8 /drivers | |
parent | 54abf37e4236288687ee44fef2060092b42f5cec (diff) |
ide-tape: struct idetape_tape_t: remove unused members
- last_frame_position: only being written to once
- firmware_revision, product_id, vendor_id: used once, remove from struct
idetape_tape_t and deal with them locally
- firmware_revision_num: only written to once
- tape_still_time_begin: completely unused
- tape_still_time: never written to; remove corresponding code chunk
- uncontrolled_last_pipeline_head: only once written to
- blocks_in_buffer: only written to
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/ide-tape.c | 45 |
1 files changed, 11 insertions, 34 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 73f06c859301..ad13527ff440 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -311,8 +311,6 @@ typedef struct ide_tape_obj { | |||
311 | u8 partition; | 311 | u8 partition; |
312 | /* Current block */ | 312 | /* Current block */ |
313 | unsigned int first_frame_position; | 313 | unsigned int first_frame_position; |
314 | unsigned int last_frame_position; | ||
315 | unsigned int blocks_in_buffer; | ||
316 | 314 | ||
317 | /* | 315 | /* |
318 | * Last error information | 316 | * Last error information |
@@ -399,11 +397,6 @@ typedef struct ide_tape_obj { | |||
399 | int avg_size; | 397 | int avg_size; |
400 | int avg_speed; | 398 | int avg_speed; |
401 | 399 | ||
402 | char vendor_id[10]; | ||
403 | char product_id[18]; | ||
404 | char firmware_revision[6]; | ||
405 | int firmware_revision_num; | ||
406 | |||
407 | /* the door is currently locked */ | 400 | /* the door is currently locked */ |
408 | int door_locked; | 401 | int door_locked; |
409 | /* the tape hardware is write protected */ | 402 | /* the tape hardware is write protected */ |
@@ -441,12 +434,6 @@ typedef struct ide_tape_obj { | |||
441 | int measure_insert_time; | 434 | int measure_insert_time; |
442 | 435 | ||
443 | /* | 436 | /* |
444 | * Measure tape still time, in milliseconds | ||
445 | */ | ||
446 | unsigned long tape_still_time_begin; | ||
447 | int tape_still_time; | ||
448 | |||
449 | /* | ||
450 | * Speed regulation negative feedback loop | 437 | * Speed regulation negative feedback loop |
451 | */ | 438 | */ |
452 | int speed_control; | 439 | int speed_control; |
@@ -454,7 +441,6 @@ typedef struct ide_tape_obj { | |||
454 | int controlled_pipeline_head_speed; | 441 | int controlled_pipeline_head_speed; |
455 | int uncontrolled_pipeline_head_speed; | 442 | int uncontrolled_pipeline_head_speed; |
456 | int controlled_last_pipeline_head; | 443 | int controlled_last_pipeline_head; |
457 | int uncontrolled_last_pipeline_head; | ||
458 | unsigned long uncontrolled_pipeline_head_time; | 444 | unsigned long uncontrolled_pipeline_head_time; |
459 | unsigned long controlled_pipeline_head_time; | 445 | unsigned long controlled_pipeline_head_time; |
460 | int controlled_previous_pipeline_head; | 446 | int controlled_previous_pipeline_head; |
@@ -1696,8 +1682,6 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive, | |||
1696 | drive->post_reset = 0; | 1682 | drive->post_reset = 0; |
1697 | } | 1683 | } |
1698 | 1684 | ||
1699 | if (tape->tape_still_time > 100 && tape->tape_still_time < 200) | ||
1700 | tape->measure_insert_time = 1; | ||
1701 | if (time_after(jiffies, tape->insert_time)) | 1685 | if (time_after(jiffies, tape->insert_time)) |
1702 | tape->insert_speed = tape->insert_size / 1024 * HZ / (jiffies - tape->insert_time); | 1686 | tape->insert_speed = tape->insert_size / 1024 * HZ / (jiffies - tape->insert_time); |
1703 | idetape_calculate_speeds(drive); | 1687 | idetape_calculate_speeds(drive); |
@@ -2009,9 +1993,6 @@ static ide_startstop_t idetape_read_position_callback(ide_drive_t *drive) | |||
2009 | tape->partition = readpos[1]; | 1993 | tape->partition = readpos[1]; |
2010 | tape->first_frame_position = | 1994 | tape->first_frame_position = |
2011 | be32_to_cpu(*(u32 *)&readpos[4]); | 1995 | be32_to_cpu(*(u32 *)&readpos[4]); |
2012 | tape->last_frame_position = | ||
2013 | be32_to_cpu(*(u32 *)&readpos[8]); | ||
2014 | tape->blocks_in_buffer = readpos[15]; | ||
2015 | set_bit(IDETAPE_ADDRESS_VALID, &tape->flags); | 1996 | set_bit(IDETAPE_ADDRESS_VALID, &tape->flags); |
2016 | idetape_end_request(drive, 1, 0); | 1997 | idetape_end_request(drive, 1, 0); |
2017 | } | 1998 | } |
@@ -2540,7 +2521,7 @@ static void idetape_restart_speed_control (ide_drive_t *drive) | |||
2540 | 2521 | ||
2541 | tape->restart_speed_control_req = 0; | 2522 | tape->restart_speed_control_req = 0; |
2542 | tape->pipeline_head = 0; | 2523 | tape->pipeline_head = 0; |
2543 | tape->controlled_last_pipeline_head = tape->uncontrolled_last_pipeline_head = 0; | 2524 | tape->controlled_last_pipeline_head = 0; |
2544 | tape->controlled_previous_pipeline_head = tape->uncontrolled_previous_pipeline_head = 0; | 2525 | tape->controlled_previous_pipeline_head = tape->uncontrolled_previous_pipeline_head = 0; |
2545 | tape->pipeline_head_speed = tape->controlled_pipeline_head_speed = 5000; | 2526 | tape->pipeline_head_speed = tape->controlled_pipeline_head_speed = 5000; |
2546 | tape->uncontrolled_pipeline_head_speed = 0; | 2527 | tape->uncontrolled_pipeline_head_speed = 0; |
@@ -3438,9 +3419,9 @@ static int idetape_identify_device (ide_drive_t *drive) | |||
3438 | 3419 | ||
3439 | static void idetape_get_inquiry_results(ide_drive_t *drive) | 3420 | static void idetape_get_inquiry_results(ide_drive_t *drive) |
3440 | { | 3421 | { |
3441 | char *r; | ||
3442 | idetape_tape_t *tape = drive->driver_data; | 3422 | idetape_tape_t *tape = drive->driver_data; |
3443 | idetape_pc_t pc; | 3423 | idetape_pc_t pc; |
3424 | char fw_rev[6], vendor_id[10], product_id[18]; | ||
3444 | 3425 | ||
3445 | idetape_create_inquiry_cmd(&pc); | 3426 | idetape_create_inquiry_cmd(&pc); |
3446 | if (idetape_queue_pc_tail(drive, &pc)) { | 3427 | if (idetape_queue_pc_tail(drive, &pc)) { |
@@ -3448,20 +3429,16 @@ static void idetape_get_inquiry_results(ide_drive_t *drive) | |||
3448 | tape->name); | 3429 | tape->name); |
3449 | return; | 3430 | return; |
3450 | } | 3431 | } |
3451 | memcpy(tape->vendor_id, &pc.buffer[8], 8); | 3432 | memcpy(vendor_id, &pc.buffer[8], 8); |
3452 | memcpy(tape->product_id, &pc.buffer[16], 16); | 3433 | memcpy(product_id, &pc.buffer[16], 16); |
3453 | memcpy(tape->firmware_revision, &pc.buffer[32], 4); | 3434 | memcpy(fw_rev, &pc.buffer[32], 4); |
3454 | 3435 | ||
3455 | ide_fixstring(tape->vendor_id, 10, 0); | 3436 | ide_fixstring(vendor_id, 10, 0); |
3456 | ide_fixstring(tape->product_id, 18, 0); | 3437 | ide_fixstring(product_id, 18, 0); |
3457 | ide_fixstring(tape->firmware_revision, 6, 0); | 3438 | ide_fixstring(fw_rev, 6, 0); |
3458 | r = tape->firmware_revision; | 3439 | |
3459 | if (*(r + 1) == '.') | ||
3460 | tape->firmware_revision_num = (*r - '0') * 100 + | ||
3461 | (*(r + 2) - '0') * 10 + *(r + 3) - '0'; | ||
3462 | printk(KERN_INFO "ide-tape: %s <-> %s: %s %s rev %s\n", | 3440 | printk(KERN_INFO "ide-tape: %s <-> %s: %s %s rev %s\n", |
3463 | drive->name, tape->name, tape->vendor_id, | 3441 | drive->name, tape->name, vendor_id, product_id, fw_rev); |
3464 | tape->product_id, tape->firmware_revision); | ||
3465 | } | 3442 | } |
3466 | 3443 | ||
3467 | /* | 3444 | /* |