diff options
author | Felipe Balbi <felipe.lima@indt.org.br> | 2007-08-10 09:34:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:55:11 -0400 |
commit | 1c1772a2609a16b3b590f8390a337dbe25859118 (patch) | |
tree | 31f7d78bcee7c56eaf9aab066e563614352b2754 /drivers/usb/misc/sisusbvga | |
parent | 2acbd647315017c07537287857ea2db36c70eacf (diff) |
USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb.h
Better indentation
Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/sisusbvga')
-rw-r--r-- | drivers/usb/misc/sisusbvga/sisusb.h | 118 |
1 files changed, 58 insertions, 60 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb.h b/drivers/usb/misc/sisusbvga/sisusb.h index 7183e762fead..d2d7872cd022 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.h +++ b/drivers/usb/misc/sisusbvga/sisusb.h | |||
@@ -8,27 +8,27 @@ | |||
8 | * | 8 | * |
9 | * Otherwise, the following license terms apply: | 9 | * Otherwise, the following license terms apply: |
10 | * | 10 | * |
11 | * * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions |
13 | * * are met: | 13 | * are met: |
14 | * * 1) Redistributions of source code must retain the above copyright | 14 | * 1) Redistributions of source code must retain the above copyright |
15 | * * notice, this list of conditions and the following disclaimer. | 15 | * notice, this list of conditions and the following disclaimer. |
16 | * * 2) Redistributions in binary form must reproduce the above copyright | 16 | * 2) Redistributions in binary form must reproduce the above copyright |
17 | * * notice, this list of conditions and the following disclaimer in the | 17 | * notice, this list of conditions and the following disclaimer in the |
18 | * * documentation and/or other materials provided with the distribution. | 18 | * documentation and/or other materials provided with the distribution. |
19 | * * 3) The name of the author may not be used to endorse or promote products | 19 | * 3) The name of the author may not be used to endorse or promote products |
20 | * * derived from this software without specific prior written permission. | 20 | * derived from this software without specific prior written permission. |
21 | * * | 21 | * |
22 | * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR | 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR |
23 | * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 23 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
24 | * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
25 | * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 25 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
26 | * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
27 | * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 27 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
28 | * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
29 | * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
30 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
31 | * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 31 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
32 | * | 32 | * |
33 | * Author: Thomas Winischhofer <thomas@winischhofer.net> | 33 | * Author: Thomas Winischhofer <thomas@winischhofer.net> |
34 | * | 34 | * |
@@ -72,7 +72,7 @@ | |||
72 | #define SISUSB_IBUF_SIZE 0x01000 | 72 | #define SISUSB_IBUF_SIZE 0x01000 |
73 | #define SISUSB_OBUF_SIZE 0x10000 /* fixed */ | 73 | #define SISUSB_OBUF_SIZE 0x10000 /* fixed */ |
74 | 74 | ||
75 | #define NUMOBUFS 8 /* max number of output buffers/output URBs */ | 75 | #define NUMOBUFS 8 /* max number of output buffers/output URBs */ |
76 | 76 | ||
77 | /* About endianness: | 77 | /* About endianness: |
78 | * | 78 | * |
@@ -103,7 +103,7 @@ | |||
103 | 103 | ||
104 | struct sisusb_usb_data; | 104 | struct sisusb_usb_data; |
105 | 105 | ||
106 | struct sisusb_urb_context { /* urb->context for outbound bulk URBs */ | 106 | struct sisusb_urb_context { /* urb->context for outbound bulk URBs */ |
107 | struct sisusb_usb_data *sisusb; | 107 | struct sisusb_usb_data *sisusb; |
108 | int urbindex; | 108 | int urbindex; |
109 | int *actual_length; | 109 | int *actual_length; |
@@ -114,16 +114,16 @@ struct sisusb_usb_data { | |||
114 | struct usb_interface *interface; | 114 | struct usb_interface *interface; |
115 | struct kref kref; | 115 | struct kref kref; |
116 | wait_queue_head_t wait_q; /* for syncind and timeouts */ | 116 | wait_queue_head_t wait_q; /* for syncind and timeouts */ |
117 | struct mutex lock; /* general race avoidance */ | 117 | struct mutex lock; /* general race avoidance */ |
118 | unsigned int ifnum; /* interface number of the USB device */ | 118 | unsigned int ifnum; /* interface number of the USB device */ |
119 | int minor; /* minor (for logging clarity) */ | 119 | int minor; /* minor (for logging clarity) */ |
120 | int isopen; /* !=0 if open */ | 120 | int isopen; /* !=0 if open */ |
121 | int present; /* !=0 if device is present on the bus */ | 121 | int present; /* !=0 if device is present on the bus */ |
122 | int ready; /* !=0 if device is ready for userland */ | 122 | int ready; /* !=0 if device is ready for userland */ |
123 | #ifdef SISUSB_OLD_CONFIG_COMPAT | 123 | #ifdef SISUSB_OLD_CONFIG_COMPAT |
124 | int ioctl32registered; | 124 | int ioctl32registered; |
125 | #endif | 125 | #endif |
126 | int numobufs; /* number of obufs = number of out urbs */ | 126 | int numobufs; /* number of obufs = number of out urbs */ |
127 | char *obuf[NUMOBUFS], *ibuf; /* transfer buffers */ | 127 | char *obuf[NUMOBUFS], *ibuf; /* transfer buffers */ |
128 | int obufsize, ibufsize; | 128 | int obufsize, ibufsize; |
129 | dma_addr_t transfer_dma_out[NUMOBUFS]; | 129 | dma_addr_t transfer_dma_out[NUMOBUFS]; |
@@ -134,13 +134,13 @@ struct sisusb_usb_data { | |||
134 | unsigned char completein; | 134 | unsigned char completein; |
135 | struct sisusb_urb_context urbout_context[NUMOBUFS]; | 135 | struct sisusb_urb_context urbout_context[NUMOBUFS]; |
136 | unsigned long flagb0; | 136 | unsigned long flagb0; |
137 | unsigned long vrambase; /* framebuffer base */ | 137 | unsigned long vrambase; /* framebuffer base */ |
138 | unsigned int vramsize; /* framebuffer size (bytes) */ | 138 | unsigned int vramsize; /* framebuffer size (bytes) */ |
139 | unsigned long mmiobase; | 139 | unsigned long mmiobase; |
140 | unsigned int mmiosize; | 140 | unsigned int mmiosize; |
141 | unsigned long ioportbase; | 141 | unsigned long ioportbase; |
142 | unsigned char devinit; /* device initialized? */ | 142 | unsigned char devinit; /* device initialized? */ |
143 | unsigned char gfxinit; /* graphics core initialized? */ | 143 | unsigned char gfxinit; /* graphics core initialized? */ |
144 | unsigned short chipid, chipvendor; | 144 | unsigned short chipid, chipvendor; |
145 | unsigned short chiprevision; | 145 | unsigned short chiprevision; |
146 | #ifdef INCL_SISUSB_CON | 146 | #ifdef INCL_SISUSB_CON |
@@ -150,7 +150,7 @@ struct sisusb_usb_data { | |||
150 | int haveconsole, con_first, con_last; | 150 | int haveconsole, con_first, con_last; |
151 | int havethisconsole[MAX_NR_CONSOLES]; | 151 | int havethisconsole[MAX_NR_CONSOLES]; |
152 | int textmodedestroyed; | 152 | int textmodedestroyed; |
153 | unsigned int sisusb_num_columns; /* real number, not vt's idea */ | 153 | unsigned int sisusb_num_columns; /* real number, not vt's idea */ |
154 | int cur_start_addr, con_rolled_over; | 154 | int cur_start_addr, con_rolled_over; |
155 | int sisusb_cursor_loc, bad_cursor_pos; | 155 | int sisusb_cursor_loc, bad_cursor_pos; |
156 | int sisusb_cursor_size_from; | 156 | int sisusb_cursor_size_from; |
@@ -195,7 +195,7 @@ struct sisusb_packet { | |||
195 | unsigned short header; | 195 | unsigned short header; |
196 | u32 address; | 196 | u32 address; |
197 | u32 data; | 197 | u32 data; |
198 | } __attribute__((__packed__)); | 198 | } __attribute__ ((__packed__)); |
199 | 199 | ||
200 | #define CLEARPACKET(packet) memset(packet, 0, 10) | 200 | #define CLEARPACKET(packet) memset(packet, 0, 10) |
201 | 201 | ||
@@ -263,36 +263,36 @@ struct sisusb_packet { | |||
263 | 263 | ||
264 | /* Structure argument for SISUSB_GET_INFO ioctl */ | 264 | /* Structure argument for SISUSB_GET_INFO ioctl */ |
265 | struct sisusb_info { | 265 | struct sisusb_info { |
266 | __u32 sisusb_id; /* for identifying sisusb */ | 266 | __u32 sisusb_id; /* for identifying sisusb */ |
267 | #define SISUSB_ID 0x53495355 /* Identify myself with 'SISU' */ | 267 | #define SISUSB_ID 0x53495355 /* Identify myself with 'SISU' */ |
268 | __u8 sisusb_version; | 268 | __u8 sisusb_version; |
269 | __u8 sisusb_revision; | 269 | __u8 sisusb_revision; |
270 | __u8 sisusb_patchlevel; | 270 | __u8 sisusb_patchlevel; |
271 | __u8 sisusb_gfxinit; /* graphics core initialized? */ | 271 | __u8 sisusb_gfxinit; /* graphics core initialized? */ |
272 | 272 | ||
273 | __u32 sisusb_vrambase; | 273 | __u32 sisusb_vrambase; |
274 | __u32 sisusb_mmiobase; | 274 | __u32 sisusb_mmiobase; |
275 | __u32 sisusb_iobase; | 275 | __u32 sisusb_iobase; |
276 | __u32 sisusb_pcibase; | 276 | __u32 sisusb_pcibase; |
277 | 277 | ||
278 | __u32 sisusb_vramsize; /* framebuffer size in bytes */ | 278 | __u32 sisusb_vramsize; /* framebuffer size in bytes */ |
279 | 279 | ||
280 | __u32 sisusb_minor; | 280 | __u32 sisusb_minor; |
281 | 281 | ||
282 | __u32 sisusb_fbdevactive; /* != 0 if framebuffer device active */ | 282 | __u32 sisusb_fbdevactive; /* != 0 if framebuffer device active */ |
283 | 283 | ||
284 | __u32 sisusb_conactive; /* != 0 if console driver active */ | 284 | __u32 sisusb_conactive; /* != 0 if console driver active */ |
285 | 285 | ||
286 | __u8 sisusb_reserved[28]; /* for future use */ | 286 | __u8 sisusb_reserved[28]; /* for future use */ |
287 | }; | 287 | }; |
288 | 288 | ||
289 | struct sisusb_command { | 289 | struct sisusb_command { |
290 | __u8 operation; /* see below */ | 290 | __u8 operation; /* see below */ |
291 | __u8 data0; /* operation dependent */ | 291 | __u8 data0; /* operation dependent */ |
292 | __u8 data1; /* operation dependent */ | 292 | __u8 data1; /* operation dependent */ |
293 | __u8 data2; /* operation dependent */ | 293 | __u8 data2; /* operation dependent */ |
294 | __u32 data3; /* operation dependent */ | 294 | __u32 data3; /* operation dependent */ |
295 | __u32 data4; /* for future use */ | 295 | __u32 data4; /* for future use */ |
296 | }; | 296 | }; |
297 | 297 | ||
298 | #define SUCMD_GET 0x01 /* for all: data0 = index, data3 = port */ | 298 | #define SUCMD_GET 0x01 /* for all: data0 = index, data3 = port */ |
@@ -304,7 +304,7 @@ struct sisusb_command { | |||
304 | 304 | ||
305 | #define SUCMD_CLRSCR 0x07 /* data0:1:2 = length, data3 = address */ | 305 | #define SUCMD_CLRSCR 0x07 /* data0:1:2 = length, data3 = address */ |
306 | 306 | ||
307 | #define SUCMD_HANDLETEXTMODE 0x08 /* Reset/destroy text mode */ | 307 | #define SUCMD_HANDLETEXTMODE 0x08 /* Reset/destroy text mode */ |
308 | 308 | ||
309 | #define SUCMD_SETMODE 0x09 /* Set a display mode (data3 = SiS mode) */ | 309 | #define SUCMD_SETMODE 0x09 /* Set a display mode (data3 = SiS mode) */ |
310 | #define SUCMD_SETVESAMODE 0x0a /* Set a display mode (data3 = VESA mode) */ | 310 | #define SUCMD_SETVESAMODE 0x0a /* Set a display mode (data3 = VESA mode) */ |
@@ -313,6 +313,4 @@ struct sisusb_command { | |||
313 | #define SISUSB_GET_CONFIG_SIZE _IOR(0xF3,0x3E,__u32) | 313 | #define SISUSB_GET_CONFIG_SIZE _IOR(0xF3,0x3E,__u32) |
314 | #define SISUSB_GET_CONFIG _IOR(0xF3,0x3F,struct sisusb_info) | 314 | #define SISUSB_GET_CONFIG _IOR(0xF3,0x3F,struct sisusb_info) |
315 | 315 | ||
316 | |||
317 | #endif /* SISUSB_H */ | 316 | #endif /* SISUSB_H */ |
318 | |||