lkml.org 
[lkml]   [2008]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 11/24] ide-tape: remove pipeline-specific code from idetape_blkdev_ioctl
Date
From
Also, strip struct idetape_config down to a single int due to unused/removed
members.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ide/ide-tape.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 447b7b4..0ebb745 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -2384,26 +2384,19 @@ static int idetape_blkdev_ioctl(ide_drive_t *drive, unsigned int cmd,
{
idetape_tape_t *tape = drive->driver_data;
void __user *argp = (void __user *)arg;
-
- struct idetape_config {
- int dsc_rw_frequency;
- int dsc_media_access_frequency;
- int nr_stages;
- } config;
+ int dsc_rw_frequency;

debug_log(DBG_PROCS, "Enter %s\n", __func__);

switch (cmd) {
case 0x0340:
- if (copy_from_user(&config, argp, sizeof(config)))
+ if (copy_from_user(&dsc_rw_frequency, argp, sizeof(int)))
return -EFAULT;
- tape->best_dsc_rw_freq = config.dsc_rw_frequency;
- tape->max_stages = config.nr_stages;
+ tape->best_dsc_rw_freq = dsc_rw_frequency;
break;
case 0x0350:
- config.dsc_rw_frequency = (int) tape->best_dsc_rw_freq;
- config.nr_stages = tape->max_stages;
- if (copy_to_user(argp, &config, sizeof(config)))
+ dsc_rw_frequency = (int) tape->best_dsc_rw_freq;
+ if (copy_to_user(argp, &dsc_rw_frequency, sizeof(int)))
return -EFAULT;
break;
default:
--
1.5.4.1


\
 
 \ /
  Last update: 2008-03-01 10:07    [W:0.160 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site