aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
authorBorislav Petkov <bbpetkov@yahoo.de>2008-02-02 13:56:51 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-02 13:56:51 -0500
commitd59823fa44f7d9babf586b3c705db314aa0f9822 (patch)
tree140c5f795cb97955eef25f88ae49238f3502ae8f /drivers/ide/ide-tape.c
parentd99c9da2159fedac30b9a105a64af91dc572571b (diff)
ide-tape: remove idetape_config_t typedef
Since this is used only in idetape_blkdev_ioctl(), remove the typedef and make the struct function-local. Bart: - s/sizeof(struct idetape_config)/sizeof(config)/ Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 06d21bba4ea8..bf40d8c824ad 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -596,15 +596,6 @@ typedef struct {
596#define IDETAPE_CAPABILITIES_PAGE 0x2a 596#define IDETAPE_CAPABILITIES_PAGE 0x2a
597 597
598/* 598/*
599 * Run time configurable parameters.
600 */
601typedef struct {
602 int dsc_rw_frequency;
603 int dsc_media_access_frequency;
604 int nr_stages;
605} idetape_config_t;
606
607/*
608 * The variables below are used for the character device interface. 599 * The variables below are used for the character device interface.
609 * Additional state variables are defined in our ide_drive_t structure. 600 * Additional state variables are defined in our ide_drive_t structure.
610 */ 601 */
@@ -2849,16 +2840,21 @@ static int idetape_rewind_tape (ide_drive_t *drive)
2849static int idetape_blkdev_ioctl(ide_drive_t *drive, unsigned int cmd, unsigned long arg) 2840static int idetape_blkdev_ioctl(ide_drive_t *drive, unsigned int cmd, unsigned long arg)
2850{ 2841{
2851 idetape_tape_t *tape = drive->driver_data; 2842 idetape_tape_t *tape = drive->driver_data;
2852 idetape_config_t config;
2853 void __user *argp = (void __user *)arg; 2843 void __user *argp = (void __user *)arg;
2854 2844
2845 struct idetape_config {
2846 int dsc_rw_frequency;
2847 int dsc_media_access_frequency;
2848 int nr_stages;
2849 } config;
2850
2855#if IDETAPE_DEBUG_LOG 2851#if IDETAPE_DEBUG_LOG
2856 if (tape->debug_level >= 4) 2852 if (tape->debug_level >= 4)
2857 printk(KERN_INFO "ide-tape: Reached idetape_blkdev_ioctl\n"); 2853 printk(KERN_INFO "ide-tape: Reached idetape_blkdev_ioctl\n");
2858#endif /* IDETAPE_DEBUG_LOG */ 2854#endif /* IDETAPE_DEBUG_LOG */
2859 switch (cmd) { 2855 switch (cmd) {
2860 case 0x0340: 2856 case 0x0340:
2861 if (copy_from_user(&config, argp, sizeof (idetape_config_t))) 2857 if (copy_from_user(&config, argp, sizeof(config)))
2862 return -EFAULT; 2858 return -EFAULT;
2863 tape->best_dsc_rw_frequency = config.dsc_rw_frequency; 2859 tape->best_dsc_rw_frequency = config.dsc_rw_frequency;
2864 tape->max_stages = config.nr_stages; 2860 tape->max_stages = config.nr_stages;
@@ -2866,7 +2862,7 @@ static int idetape_blkdev_ioctl(ide_drive_t *drive, unsigned int cmd, unsigned l
2866 case 0x0350: 2862 case 0x0350:
2867 config.dsc_rw_frequency = (int) tape->best_dsc_rw_frequency; 2863 config.dsc_rw_frequency = (int) tape->best_dsc_rw_frequency;
2868 config.nr_stages = tape->max_stages; 2864 config.nr_stages = tape->max_stages;
2869 if (copy_to_user(argp, &config, sizeof (idetape_config_t))) 2865 if (copy_to_user(argp, &config, sizeof(config)))
2870 return -EFAULT; 2866 return -EFAULT;
2871 break; 2867 break;
2872 default: 2868 default: