aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic94xx/aic94xx_reg.c
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-03-28 17:48:34 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-07 13:19:08 -0400
commit81e56ded878aeb8730f18c1d0a70d5face788be3 (patch)
tree18485d237927fb1d95179bc1e03d4ebe6ef7d389 /drivers/scsi/aic94xx/aic94xx_reg.c
parentd70d4667e9eead06aa38be947274fda22dcf923b (diff)
[SCSI] aic94xx: cleanups
- static functions in .c files shouldn't be marked inline - make needlessly global code static - remove the unused aic94xx_seq.c:asd_unpause_lseq() - #if 0 other unused code [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aic94xx/aic94xx_reg.c')
-rw-r--r--drivers/scsi/aic94xx/aic94xx_reg.c53
1 files changed, 26 insertions, 27 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_reg.c b/drivers/scsi/aic94xx/aic94xx_reg.c
index f210dac3203..56b17c22526 100644
--- a/drivers/scsi/aic94xx/aic94xx_reg.c
+++ b/drivers/scsi/aic94xx/aic94xx_reg.c
@@ -32,8 +32,8 @@
32 * Offset comes before value to remind that the operation of 32 * Offset comes before value to remind that the operation of
33 * this function is *offs = val. 33 * this function is *offs = val.
34 */ 34 */
35static inline void asd_write_byte(struct asd_ha_struct *asd_ha, 35static void asd_write_byte(struct asd_ha_struct *asd_ha,
36 unsigned long offs, u8 val) 36 unsigned long offs, u8 val)
37{ 37{
38 if (unlikely(asd_ha->iospace)) 38 if (unlikely(asd_ha->iospace))
39 outb(val, 39 outb(val,
@@ -43,8 +43,8 @@ static inline void asd_write_byte(struct asd_ha_struct *asd_ha,
43 wmb(); 43 wmb();
44} 44}
45 45
46static inline void asd_write_word(struct asd_ha_struct *asd_ha, 46static void asd_write_word(struct asd_ha_struct *asd_ha,
47 unsigned long offs, u16 val) 47 unsigned long offs, u16 val)
48{ 48{
49 if (unlikely(asd_ha->iospace)) 49 if (unlikely(asd_ha->iospace))
50 outw(val, 50 outw(val,
@@ -54,8 +54,8 @@ static inline void asd_write_word(struct asd_ha_struct *asd_ha,
54 wmb(); 54 wmb();
55} 55}
56 56
57static inline void asd_write_dword(struct asd_ha_struct *asd_ha, 57static void asd_write_dword(struct asd_ha_struct *asd_ha,
58 unsigned long offs, u32 val) 58 unsigned long offs, u32 val)
59{ 59{
60 if (unlikely(asd_ha->iospace)) 60 if (unlikely(asd_ha->iospace))
61 outl(val, 61 outl(val,
@@ -67,8 +67,7 @@ static inline void asd_write_dword(struct asd_ha_struct *asd_ha,
67 67
68/* Reading from device address space. 68/* Reading from device address space.
69 */ 69 */
70static inline u8 asd_read_byte(struct asd_ha_struct *asd_ha, 70static u8 asd_read_byte(struct asd_ha_struct *asd_ha, unsigned long offs)
71 unsigned long offs)
72{ 71{
73 u8 val; 72 u8 val;
74 if (unlikely(asd_ha->iospace)) 73 if (unlikely(asd_ha->iospace))
@@ -80,8 +79,8 @@ static inline u8 asd_read_byte(struct asd_ha_struct *asd_ha,
80 return val; 79 return val;
81} 80}
82 81
83static inline u16 asd_read_word(struct asd_ha_struct *asd_ha, 82static u16 asd_read_word(struct asd_ha_struct *asd_ha,
84 unsigned long offs) 83 unsigned long offs)
85{ 84{
86 u16 val; 85 u16 val;
87 if (unlikely(asd_ha->iospace)) 86 if (unlikely(asd_ha->iospace))
@@ -93,8 +92,8 @@ static inline u16 asd_read_word(struct asd_ha_struct *asd_ha,
93 return val; 92 return val;
94} 93}
95 94
96static inline u32 asd_read_dword(struct asd_ha_struct *asd_ha, 95static u32 asd_read_dword(struct asd_ha_struct *asd_ha,
97 unsigned long offs) 96 unsigned long offs)
98{ 97{
99 u32 val; 98 u32 val;
100 if (unlikely(asd_ha->iospace)) 99 if (unlikely(asd_ha->iospace))
@@ -124,22 +123,22 @@ static inline u32 asd_mem_offs_swb(void)
124/* We know that the register wanted is in the range 123/* We know that the register wanted is in the range
125 * of the sliding window. 124 * of the sliding window.
126 */ 125 */
127#define ASD_READ_SW(ww, type, ord) \ 126#define ASD_READ_SW(ww, type, ord) \
128static inline type asd_read_##ww##_##ord (struct asd_ha_struct *asd_ha,\ 127static type asd_read_##ww##_##ord(struct asd_ha_struct *asd_ha, \
129 u32 reg) \ 128 u32 reg) \
130{ \ 129{ \
131 struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[0]; \ 130 struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[0]; \
132 u32 map_offs=(reg - io_handle-> ww##_base )+asd_mem_offs_##ww ();\ 131 u32 map_offs = (reg - io_handle->ww##_base) + asd_mem_offs_##ww();\
133 return asd_read_##ord (asd_ha, (unsigned long) map_offs); \ 132 return asd_read_##ord(asd_ha, (unsigned long)map_offs); \
134} 133}
135 134
136#define ASD_WRITE_SW(ww, type, ord) \ 135#define ASD_WRITE_SW(ww, type, ord) \
137static inline void asd_write_##ww##_##ord (struct asd_ha_struct *asd_ha,\ 136static void asd_write_##ww##_##ord(struct asd_ha_struct *asd_ha, \
138 u32 reg, type val) \ 137 u32 reg, type val) \
139{ \ 138{ \
140 struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[0]; \ 139 struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[0]; \
141 u32 map_offs=(reg - io_handle-> ww##_base )+asd_mem_offs_##ww ();\ 140 u32 map_offs = (reg - io_handle->ww##_base) + asd_mem_offs_##ww();\
142 asd_write_##ord (asd_ha, (unsigned long) map_offs, val); \ 141 asd_write_##ord(asd_ha, (unsigned long)map_offs, val); \
143} 142}
144 143
145ASD_READ_SW(swa, u8, byte); 144ASD_READ_SW(swa, u8, byte);
@@ -186,7 +185,7 @@ ASD_WRITE_SW(swc, u32, dword);
186 * @asd_ha: pointer to host adapter structure 185 * @asd_ha: pointer to host adapter structure
187 * @reg: register desired to be within range of the new window 186 * @reg: register desired to be within range of the new window
188 */ 187 */
189static inline void asd_move_swb(struct asd_ha_struct *asd_ha, u32 reg) 188static void asd_move_swb(struct asd_ha_struct *asd_ha, u32 reg)
190{ 189{
191 u32 base = reg & ~(MBAR0_SWB_SIZE-1); 190 u32 base = reg & ~(MBAR0_SWB_SIZE-1);
192 pci_write_config_dword(asd_ha->pcidev, PCI_CONF_MBAR0_SWB, base); 191 pci_write_config_dword(asd_ha->pcidev, PCI_CONF_MBAR0_SWB, base);