Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
47ce8a9e
Commit
47ce8a9e
authored
May 09, 2004
by
Christoph Hellwig
Committed by
James Bottomley
May 09, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] imm/ppa style police
fix remaining style problems after Al ressurrected the drivers.
parent
e128a80f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
32 deletions
+42
-32
drivers/scsi/imm.c
drivers/scsi/imm.c
+22
-18
drivers/scsi/imm.h
drivers/scsi/imm.h
+1
-1
drivers/scsi/ppa.c
drivers/scsi/ppa.c
+18
-12
drivers/scsi/ppa.h
drivers/scsi/ppa.h
+1
-1
No files found.
drivers/scsi/imm.c
View file @
47ce8a9e
...
...
@@ -12,6 +12,18 @@
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/blkdev.h>
#include <linux/parport.h>
#include <linux/workqueue.h>
#include <asm/io.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
/* The following #define is to avoid a clash with hosts.c */
#define IMM_PROBE_SPP 0x0001
...
...
@@ -20,22 +32,13 @@
#define IMM_PROBE_EPP17 0x0100
#define IMM_PROBE_EPP19 0x0200
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/blkdev.h>
#include <asm/io.h>
#include <linux/parport.h>
#include <linux/workqueue.h>
#include "scsi.h"
#include "hosts.h"
typedef
struct
{
struct
pardevice
*
dev
;
/* Parport device entry */
int
base
;
/* Actual port address */
int
base_hi
;
/* Hi Base address for ECP-ISA chipset */
int
mode
;
/* Transfer mode */
Scsi_C
mnd
*
cur_cmd
;
/* Current queued command */
struct
scsi_c
mnd
*
cur_cmd
;
/* Current queued command */
struct
work_struct
imm_tq
;
/* Polling interrupt stuff */
unsigned
long
jstart
;
/* Jiffies at start */
unsigned
failed
:
1
;
/* Failure flag */
...
...
@@ -613,7 +616,7 @@ static int imm_init(imm_struct *dev)
return
device_check
(
dev
);
}
static
inline
int
imm_send_command
(
Scsi_C
mnd
*
cmd
)
static
inline
int
imm_send_command
(
struct
scsi_c
mnd
*
cmd
)
{
imm_struct
*
dev
=
imm_dev
(
cmd
->
device
->
host
);
int
k
;
...
...
@@ -633,7 +636,7 @@ static inline int imm_send_command(Scsi_Cmnd *cmd)
* The driver appears to remain stable if we speed up the parallel port
* i/o in this function, but not elsewhere.
*/
static
int
imm_completion
(
Scsi_C
mnd
*
cmd
)
static
int
imm_completion
(
struct
scsi_c
mnd
*
cmd
)
{
/* Return codes:
* -1 Error
...
...
@@ -736,7 +739,7 @@ static int imm_completion(Scsi_Cmnd *cmd)
static
void
imm_interrupt
(
void
*
data
)
{
imm_struct
*
dev
=
(
imm_struct
*
)
data
;
Scsi_C
mnd
*
cmd
=
dev
->
cur_cmd
;
struct
scsi_c
mnd
*
cmd
=
dev
->
cur_cmd
;
struct
Scsi_Host
*
host
=
cmd
->
device
->
host
;
unsigned
long
flags
;
...
...
@@ -796,7 +799,7 @@ static void imm_interrupt(void *data)
return
;
}
static
int
imm_engine
(
imm_struct
*
dev
,
Scsi_C
mnd
*
cmd
)
static
int
imm_engine
(
imm_struct
*
dev
,
struct
scsi_c
mnd
*
cmd
)
{
unsigned
short
ppb
=
dev
->
base
;
unsigned
char
l
=
0
,
h
=
0
;
...
...
@@ -937,7 +940,8 @@ static int imm_engine(imm_struct *dev, Scsi_Cmnd *cmd)
return
0
;
}
static
int
imm_queuecommand
(
Scsi_Cmnd
*
cmd
,
void
(
*
done
)(
Scsi_Cmnd
*
))
static
int
imm_queuecommand
(
struct
scsi_cmnd
*
cmd
,
void
(
*
done
)(
struct
scsi_cmnd
*
))
{
imm_struct
*
dev
=
imm_dev
(
cmd
->
device
->
host
);
...
...
@@ -980,7 +984,7 @@ static int imm_biosparam(struct scsi_device *sdev, struct block_device *dev,
return
0
;
}
static
int
imm_abort
(
Scsi_C
mnd
*
cmd
)
static
int
imm_abort
(
struct
scsi_c
mnd
*
cmd
)
{
imm_struct
*
dev
=
imm_dev
(
cmd
->
device
->
host
);
/*
...
...
@@ -1012,7 +1016,7 @@ static void imm_reset_pulse(unsigned int base)
w_ctr
(
base
,
0x04
);
}
static
int
imm_reset
(
Scsi_C
mnd
*
cmd
)
static
int
imm_reset
(
struct
scsi_c
mnd
*
cmd
)
{
imm_struct
*
dev
=
imm_dev
(
cmd
->
device
->
host
);
...
...
@@ -1114,7 +1118,7 @@ static int device_check(imm_struct *dev)
return
-
ENODEV
;
}
static
Scsi_Host_T
emplate
imm_template
=
{
static
struct
scsi_host_t
emplate
imm_template
=
{
.
module
=
THIS_MODULE
,
.
proc_name
=
"imm"
,
.
proc_info
=
imm_proc_info
,
...
...
drivers/scsi/imm.h
View file @
47ce8a9e
...
...
@@ -139,6 +139,6 @@ static char *IMM_MODE_STRING[] =
#define w_ctr(x,y) outb(y, (x)+2)
#endif
static
int
imm_engine
(
imm_struct
*
,
Scsi_C
mnd
*
);
static
int
imm_engine
(
imm_struct
*
,
struct
scsi_c
mnd
*
);
#endif
/* _IMM_H */
drivers/scsi/ppa.c
View file @
47ce8a9e
...
...
@@ -15,18 +15,23 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/blkdev.h>
#include <asm/io.h>
#include <linux/parport.h>
#include <linux/workqueue.h>
#include "scsi.h"
#include "hosts.h"
#include <asm/io.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
static
void
ppa_reset_pulse
(
unsigned
int
base
);
typedef
struct
{
struct
pardevice
*
dev
;
/* Parport device entry */
int
base
;
/* Actual port address */
int
mode
;
/* Transfer mode */
Scsi_C
mnd
*
cur_cmd
;
/* Current queued command */
struct
scsi_c
mnd
*
cur_cmd
;
/* Current queued command */
struct
work_struct
ppa_tq
;
/* Polling interrupt stuff */
unsigned
long
jstart
;
/* Jiffies at start */
unsigned
long
recon_tmo
;
/* How many usecs to wait for reconnection (6th bit) */
...
...
@@ -501,7 +506,7 @@ static int ppa_init(ppa_struct *dev)
return
device_check
(
dev
);
}
static
inline
int
ppa_send_command
(
Scsi_C
mnd
*
cmd
)
static
inline
int
ppa_send_command
(
struct
scsi_c
mnd
*
cmd
)
{
ppa_struct
*
dev
=
ppa_dev
(
cmd
->
device
->
host
);
int
k
;
...
...
@@ -522,7 +527,7 @@ static inline int ppa_send_command(Scsi_Cmnd *cmd)
* The driver appears to remain stable if we speed up the parallel port
* i/o in this function, but not elsewhere.
*/
static
int
ppa_completion
(
Scsi_C
mnd
*
cmd
)
static
int
ppa_completion
(
struct
scsi_c
mnd
*
cmd
)
{
/* Return codes:
* -1 Error
...
...
@@ -626,7 +631,7 @@ static int ppa_completion(Scsi_Cmnd *cmd)
static
void
ppa_interrupt
(
void
*
data
)
{
ppa_struct
*
dev
=
(
ppa_struct
*
)
data
;
Scsi_C
mnd
*
cmd
=
dev
->
cur_cmd
;
struct
scsi_c
mnd
*
cmd
=
dev
->
cur_cmd
;
if
(
!
cmd
)
{
printk
(
"PPA: bug in ppa_interrupt
\n
"
);
...
...
@@ -682,7 +687,7 @@ static void ppa_interrupt(void *data)
cmd
->
scsi_done
(
cmd
);
}
static
int
ppa_engine
(
ppa_struct
*
dev
,
Scsi_C
mnd
*
cmd
)
static
int
ppa_engine
(
ppa_struct
*
dev
,
struct
scsi_c
mnd
*
cmd
)
{
unsigned
short
ppb
=
dev
->
base
;
unsigned
char
l
=
0
,
h
=
0
;
...
...
@@ -802,7 +807,8 @@ static int ppa_engine(ppa_struct *dev, Scsi_Cmnd *cmd)
return
0
;
}
static
int
ppa_queuecommand
(
Scsi_Cmnd
*
cmd
,
void
(
*
done
)
(
Scsi_Cmnd
*
))
static
int
ppa_queuecommand
(
struct
scsi_cmnd
*
cmd
,
void
(
*
done
)
(
struct
scsi_cmnd
*
))
{
ppa_struct
*
dev
=
ppa_dev
(
cmd
->
device
->
host
);
...
...
@@ -847,7 +853,7 @@ static int ppa_biosparam(struct scsi_device *sdev, struct block_device *dev,
return
0
;
}
static
int
ppa_abort
(
Scsi_C
mnd
*
cmd
)
static
int
ppa_abort
(
struct
scsi_c
mnd
*
cmd
)
{
ppa_struct
*
dev
=
ppa_dev
(
cmd
->
device
->
host
);
/*
...
...
@@ -875,7 +881,7 @@ static void ppa_reset_pulse(unsigned int base)
w_ctr
(
base
,
0xc
);
}
static
int
ppa_reset
(
Scsi_C
mnd
*
cmd
)
static
int
ppa_reset
(
struct
scsi_c
mnd
*
cmd
)
{
ppa_struct
*
dev
=
ppa_dev
(
cmd
->
device
->
host
);
...
...
@@ -974,7 +980,7 @@ static int device_check(ppa_struct *dev)
return
-
ENODEV
;
}
static
Scsi_Host_T
emplate
ppa_template
=
{
static
struct
scsi_host_t
emplate
ppa_template
=
{
.
module
=
THIS_MODULE
,
.
proc_name
=
"ppa"
,
.
proc_info
=
ppa_proc_info
,
...
...
drivers/scsi/ppa.h
View file @
47ce8a9e
...
...
@@ -146,6 +146,6 @@ static char *PPA_MODE_STRING[] =
#define w_ctr(x,y) outb(y, (x)+2)
#endif
static
int
ppa_engine
(
ppa_struct
*
,
Scsi_C
mnd
*
);
static
int
ppa_engine
(
ppa_struct
*
,
struct
scsi_c
mnd
*
);
#endif
/* _PPA_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment