IDE: Coding Style fixes to drivers/ide/pci/cmd640.c
Fix all the errors and a few warnings. Compile tested. [bart: some fixes, md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
4eb68a256d
commit
4752b5e776
1 changed files with 48 additions and 46 deletions
|
@ -98,7 +98,7 @@
|
||||||
|
|
||||||
#define CMD640_PREFETCH_MASKS 1
|
#define CMD640_PREFETCH_MASKS 1
|
||||||
|
|
||||||
//#define CMD640_DUMP_REGS
|
/*#define CMD640_DUMP_REGS */
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
/*
|
/*
|
||||||
* This flag is set in ide.c by the parameter: ide0=cmd640_vlb
|
* This flag is set in ide.c by the parameter: ide0=cmd640_vlb
|
||||||
*/
|
*/
|
||||||
int cmd640_vlb = 0;
|
int cmd640_vlb;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CMD640 specific registers definition.
|
* CMD640 specific registers definition.
|
||||||
|
@ -613,13 +613,14 @@ static void cmd640_set_pio_mode(ide_drive_t *drive, const u8 pio)
|
||||||
if (pio & 1)
|
if (pio & 1)
|
||||||
b |= 0x27;
|
b |= 0x27;
|
||||||
put_cmd640_reg(CNTRL, b);
|
put_cmd640_reg(CNTRL, b);
|
||||||
printk("%s: %sabled cmd640 fast host timing (devsel)\n", drive->name, (pio & 1) ? "en" : "dis");
|
printk("%s: %sabled cmd640 fast host timing (devsel)\n",
|
||||||
|
drive->name, (pio & 1) ? "en" : "dis");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case 8: /* set prefetch off */
|
case 8: /* set prefetch off */
|
||||||
case 9: /* set prefetch on */
|
case 9: /* set prefetch on */
|
||||||
set_prefetch_mode(drive, index, pio & 1);
|
set_prefetch_mode(drive, index, pio & 1);
|
||||||
printk("%s: %sabled cmd640 prefetch\n", drive->name, (pio & 1) ? "en" : "dis");
|
printk("%s: %sabled cmd640 prefetch\n",
|
||||||
|
drive->name, (pio & 1) ? "en" : "dis");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -836,8 +837,9 @@ static int __init cmd640x_init(void)
|
||||||
#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
|
#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
|
||||||
if (drive->autotune || ((index > 1) && second_port_toggled)) {
|
if (drive->autotune || ((index > 1) && second_port_toggled)) {
|
||||||
/*
|
/*
|
||||||
* Reset timing to the slowest speed and turn off prefetch.
|
* Reset timing to the slowest speed and turn off
|
||||||
* This way, the drive identify code has a better chance.
|
* prefetch. This way, the drive identify code has
|
||||||
|
* a better chance.
|
||||||
*/
|
*/
|
||||||
setup_counts [index] = 4; /* max possible */
|
setup_counts [index] = 4; /* max possible */
|
||||||
active_counts [index] = 16; /* max possible */
|
active_counts [index] = 16; /* max possible */
|
||||||
|
|
Loading…
Add table
Reference in a new issue