Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: vsxxxaa - change formatting style to match the rest of the kernel

- no spaces between function name and opening parenthesis
- switch statements were indented too much

This makes checkpatch (and me) happy.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

+172 -196
+172 -196
drivers/input/mouse/vsxxxaa.c
··· 86 86 87 87 #define DRIVER_DESC "Driver for DEC VSXXX-AA and -GA mice and VSXXX-AB tablet" 88 88 89 - MODULE_AUTHOR ("Jan-Benedict Glaw <jbglaw@lug-owl.de>"); 90 - MODULE_DESCRIPTION (DRIVER_DESC); 91 - MODULE_LICENSE ("GPL"); 89 + MODULE_AUTHOR("Jan-Benedict Glaw <jbglaw@lug-owl.de>"); 90 + MODULE_DESCRIPTION(DRIVER_DESC); 91 + MODULE_LICENSE("GPL"); 92 92 93 93 #undef VSXXXAA_DEBUG 94 94 #ifdef VSXXXAA_DEBUG 95 - #define DBG(x...) printk (x) 95 + #define DBG(x...) printk(x) 96 96 #else 97 97 #define DBG(x...) do {} while (0) 98 98 #endif 99 99 100 100 #define VSXXXAA_INTRO_MASK 0x80 101 101 #define VSXXXAA_INTRO_HEAD 0x80 102 - #define IS_HDR_BYTE(x) (((x) & VSXXXAA_INTRO_MASK) \ 103 - == VSXXXAA_INTRO_HEAD) 102 + #define IS_HDR_BYTE(x) \ 103 + (((x) & VSXXXAA_INTRO_MASK) == VSXXXAA_INTRO_HEAD) 104 104 105 105 #define VSXXXAA_PACKET_MASK 0xe0 106 106 #define VSXXXAA_PACKET_REL 0x80 107 107 #define VSXXXAA_PACKET_ABS 0xc0 108 108 #define VSXXXAA_PACKET_POR 0xa0 109 - #define MATCH_PACKET_TYPE(data, type) (((data) & VSXXXAA_PACKET_MASK) == (type)) 109 + #define MATCH_PACKET_TYPE(data, type) \ 110 + (((data) & VSXXXAA_PACKET_MASK) == (type)) 110 111 111 112 112 113 ··· 124 123 char phys[32]; 125 124 }; 126 125 127 - static void 128 - vsxxxaa_drop_bytes (struct vsxxxaa *mouse, int num) 126 + static void vsxxxaa_drop_bytes(struct vsxxxaa *mouse, int num) 129 127 { 130 - if (num >= mouse->count) 128 + if (num >= mouse->count) { 131 129 mouse->count = 0; 132 - else { 133 - memmove (mouse->buf, mouse->buf + num - 1, BUFLEN - num); 130 + } else { 131 + memmove(mouse->buf, mouse->buf + num - 1, BUFLEN - num); 134 132 mouse->count -= num; 135 133 } 136 134 } 137 135 138 - static void 139 - vsxxxaa_queue_byte (struct vsxxxaa *mouse, unsigned char byte) 136 + static void vsxxxaa_queue_byte(struct vsxxxaa *mouse, unsigned char byte) 140 137 { 141 138 if (mouse->count == BUFLEN) { 142 - printk (KERN_ERR "%s on %s: Dropping a byte of full buffer.\n", 143 - mouse->name, mouse->phys); 144 - vsxxxaa_drop_bytes (mouse, 1); 139 + printk(KERN_ERR "%s on %s: Dropping a byte of full buffer.\n", 140 + mouse->name, mouse->phys); 141 + vsxxxaa_drop_bytes(mouse, 1); 145 142 } 146 - DBG (KERN_INFO "Queueing byte 0x%02x\n", byte); 143 + 144 + DBG(KERN_INFO "Queueing byte 0x%02x\n", byte); 147 145 148 146 mouse->buf[mouse->count++] = byte; 149 147 } 150 148 151 - static void 152 - vsxxxaa_detection_done (struct vsxxxaa *mouse) 149 + static void vsxxxaa_detection_done(struct vsxxxaa *mouse) 153 150 { 154 151 switch (mouse->type) { 155 - case 0x02: 156 - strlcpy (mouse->name, "DEC VSXXX-AA/-GA mouse", 157 - sizeof (mouse->name)); 158 - break; 152 + case 0x02: 153 + strlcpy(mouse->name, "DEC VSXXX-AA/-GA mouse", 154 + sizeof(mouse->name)); 155 + break; 159 156 160 - case 0x04: 161 - strlcpy (mouse->name, "DEC VSXXX-AB digitizer", 162 - sizeof (mouse->name)); 163 - break; 157 + case 0x04: 158 + strlcpy(mouse->name, "DEC VSXXX-AB digitizer", 159 + sizeof(mouse->name)); 160 + break; 164 161 165 - default: 166 - snprintf (mouse->name, sizeof (mouse->name), 167 - "unknown DEC pointer device (type = 0x%02x)", 168 - mouse->type); 169 - break; 162 + default: 163 + snprintf(mouse->name, sizeof(mouse->name), 164 + "unknown DEC pointer device (type = 0x%02x)", 165 + mouse->type); 166 + break; 170 167 } 171 168 172 - printk (KERN_INFO 169 + printk(KERN_INFO 173 170 "Found %s version 0x%02x from country 0x%02x on port %s\n", 174 171 mouse->name, mouse->version, mouse->country, mouse->phys); 175 172 } ··· 175 176 /* 176 177 * Returns number of bytes to be dropped, 0 if packet is okay. 177 178 */ 178 - static int 179 - vsxxxaa_check_packet (struct vsxxxaa *mouse, int packet_len) 179 + static int vsxxxaa_check_packet(struct vsxxxaa *mouse, int packet_len) 180 180 { 181 181 int i; 182 182 183 183 /* First byte must be a header byte */ 184 - if (!IS_HDR_BYTE (mouse->buf[0])) { 185 - DBG ("vsck: len=%d, 1st=0x%02x\n", packet_len, mouse->buf[0]); 184 + if (!IS_HDR_BYTE(mouse->buf[0])) { 185 + DBG("vsck: len=%d, 1st=0x%02x\n", packet_len, mouse->buf[0]); 186 186 return 1; 187 187 } 188 188 189 189 /* Check all following bytes */ 190 - if (packet_len > 1) { 191 - for (i = 1; i < packet_len; i++) { 192 - if (IS_HDR_BYTE (mouse->buf[i])) { 193 - printk (KERN_ERR "Need to drop %d bytes " 194 - "of a broken packet.\n", 195 - i - 1); 196 - DBG (KERN_INFO "check: len=%d, b[%d]=0x%02x\n", 197 - packet_len, i, mouse->buf[i]); 198 - return i - 1; 199 - } 190 + for (i = 1; i < packet_len; i++) { 191 + if (IS_HDR_BYTE(mouse->buf[i])) { 192 + printk(KERN_ERR 193 + "Need to drop %d bytes of a broken packet.\n", 194 + i - 1); 195 + DBG(KERN_INFO "check: len=%d, b[%d]=0x%02x\n", 196 + packet_len, i, mouse->buf[i]); 197 + return i - 1; 200 198 } 201 199 } 202 200 203 201 return 0; 204 202 } 205 203 206 - static __inline__ int 207 - vsxxxaa_smells_like_packet (struct vsxxxaa *mouse, unsigned char type, size_t len) 204 + static inline int vsxxxaa_smells_like_packet(struct vsxxxaa *mouse, 205 + unsigned char type, size_t len) 208 206 { 209 - return (mouse->count >= len) && MATCH_PACKET_TYPE (mouse->buf[0], type); 207 + return mouse->count >= len && MATCH_PACKET_TYPE(mouse->buf[0], type); 210 208 } 211 209 212 - static void 213 - vsxxxaa_handle_REL_packet (struct vsxxxaa *mouse) 210 + static void vsxxxaa_handle_REL_packet(struct vsxxxaa *mouse) 214 211 { 215 212 struct input_dev *dev = mouse->dev; 216 213 unsigned char *buf = mouse->buf; ··· 227 232 * 0, bit 4 of byte 0 is direction. 228 233 */ 229 234 dx = buf[1] & 0x7f; 230 - dx *= ((buf[0] >> 4) & 0x01)? 1: -1; 235 + dx *= ((buf[0] >> 4) & 0x01) ? 1 : -1; 231 236 232 237 /* 233 238 * Low 7 bit of byte 2 are abs(dy), bit 7 is 234 239 * 0, bit 3 of byte 0 is direction. 235 240 */ 236 241 dy = buf[2] & 0x7f; 237 - dy *= ((buf[0] >> 3) & 0x01)? -1: 1; 242 + dy *= ((buf[0] >> 3) & 0x01) ? -1 : 1; 238 243 239 244 /* 240 245 * Get button state. It's the low three bits 241 246 * (for three buttons) of byte 0. 242 247 */ 243 - left = (buf[0] & 0x04)? 1: 0; 244 - middle = (buf[0] & 0x02)? 1: 0; 245 - right = (buf[0] & 0x01)? 1: 0; 248 + left = buf[0] & 0x04; 249 + middle = buf[0] & 0x02; 250 + right = buf[0] & 0x01; 246 251 247 - vsxxxaa_drop_bytes (mouse, 3); 252 + vsxxxaa_drop_bytes(mouse, 3); 248 253 249 - DBG (KERN_INFO "%s on %s: dx=%d, dy=%d, buttons=%s%s%s\n", 250 - mouse->name, mouse->phys, dx, dy, 251 - left? "L": "l", middle? "M": "m", right? "R": "r"); 254 + DBG(KERN_INFO "%s on %s: dx=%d, dy=%d, buttons=%s%s%s\n", 255 + mouse->name, mouse->phys, dx, dy, 256 + left ? "L" : "l", middle ? "M" : "m", right ? "R" : "r"); 252 257 253 258 /* 254 259 * Report what we've found so far... 255 260 */ 256 - input_report_key (dev, BTN_LEFT, left); 257 - input_report_key (dev, BTN_MIDDLE, middle); 258 - input_report_key (dev, BTN_RIGHT, right); 259 - input_report_key (dev, BTN_TOUCH, 0); 260 - input_report_rel (dev, REL_X, dx); 261 - input_report_rel (dev, REL_Y, dy); 262 - input_sync (dev); 261 + input_report_key(dev, BTN_LEFT, left); 262 + input_report_key(dev, BTN_MIDDLE, middle); 263 + input_report_key(dev, BTN_RIGHT, right); 264 + input_report_key(dev, BTN_TOUCH, 0); 265 + input_report_rel(dev, REL_X, dx); 266 + input_report_rel(dev, REL_Y, dy); 267 + input_sync(dev); 263 268 } 264 269 265 - static void 266 - vsxxxaa_handle_ABS_packet (struct vsxxxaa *mouse) 270 + static void vsxxxaa_handle_ABS_packet(struct vsxxxaa *mouse) 267 271 { 268 272 struct input_dev *dev = mouse->dev; 269 273 unsigned char *buf = mouse->buf; ··· 290 296 /* 291 297 * Get button state. It's bits <4..1> of byte 0. 292 298 */ 293 - left = (buf[0] & 0x02)? 1: 0; 294 - middle = (buf[0] & 0x04)? 1: 0; 295 - right = (buf[0] & 0x08)? 1: 0; 296 - touch = (buf[0] & 0x10)? 1: 0; 299 + left = buf[0] & 0x02; 300 + middle = buf[0] & 0x04; 301 + right = buf[0] & 0x08; 302 + touch = buf[0] & 0x10; 297 303 298 - vsxxxaa_drop_bytes (mouse, 5); 304 + vsxxxaa_drop_bytes(mouse, 5); 299 305 300 - DBG (KERN_INFO "%s on %s: x=%d, y=%d, buttons=%s%s%s%s\n", 301 - mouse->name, mouse->phys, x, y, 302 - left? "L": "l", middle? "M": "m", 303 - right? "R": "r", touch? "T": "t"); 306 + DBG(KERN_INFO "%s on %s: x=%d, y=%d, buttons=%s%s%s%s\n", 307 + mouse->name, mouse->phys, x, y, 308 + left ? "L" : "l", middle ? "M" : "m", 309 + right ? "R" : "r", touch ? "T" : "t"); 304 310 305 311 /* 306 312 * Report what we've found so far... 307 313 */ 308 - input_report_key (dev, BTN_LEFT, left); 309 - input_report_key (dev, BTN_MIDDLE, middle); 310 - input_report_key (dev, BTN_RIGHT, right); 311 - input_report_key (dev, BTN_TOUCH, touch); 312 - input_report_abs (dev, ABS_X, x); 313 - input_report_abs (dev, ABS_Y, y); 314 - input_sync (dev); 314 + input_report_key(dev, BTN_LEFT, left); 315 + input_report_key(dev, BTN_MIDDLE, middle); 316 + input_report_key(dev, BTN_RIGHT, right); 317 + input_report_key(dev, BTN_TOUCH, touch); 318 + input_report_abs(dev, ABS_X, x); 319 + input_report_abs(dev, ABS_Y, y); 320 + input_sync(dev); 315 321 } 316 322 317 - static void 318 - vsxxxaa_handle_POR_packet (struct vsxxxaa *mouse) 323 + static void vsxxxaa_handle_POR_packet(struct vsxxxaa *mouse) 319 324 { 320 325 struct input_dev *dev = mouse->dev; 321 326 unsigned char *buf = mouse->buf; ··· 349 356 * (for three buttons) of byte 0. Maybe even the bit <3> 350 357 * has some meaning if a tablet is attached. 351 358 */ 352 - left = (buf[0] & 0x04)? 1: 0; 353 - middle = (buf[0] & 0x02)? 1: 0; 354 - right = (buf[0] & 0x01)? 1: 0; 359 + left = buf[0] & 0x04; 360 + middle = buf[0] & 0x02; 361 + right = buf[0] & 0x01; 355 362 356 - vsxxxaa_drop_bytes (mouse, 4); 357 - vsxxxaa_detection_done (mouse); 363 + vsxxxaa_drop_bytes(mouse, 4); 364 + vsxxxaa_detection_done(mouse); 358 365 359 366 if (error <= 0x1f) { 360 367 /* No (serious) error. Report buttons */ 361 - input_report_key (dev, BTN_LEFT, left); 362 - input_report_key (dev, BTN_MIDDLE, middle); 363 - input_report_key (dev, BTN_RIGHT, right); 364 - input_report_key (dev, BTN_TOUCH, 0); 365 - input_sync (dev); 368 + input_report_key(dev, BTN_LEFT, left); 369 + input_report_key(dev, BTN_MIDDLE, middle); 370 + input_report_key(dev, BTN_RIGHT, right); 371 + input_report_key(dev, BTN_TOUCH, 0); 372 + input_sync(dev); 366 373 367 374 if (error != 0) 368 - printk (KERN_INFO "Your %s on %s reports error=0x%02x\n", 369 - mouse->name, mouse->phys, error); 375 + printk(KERN_INFO "Your %s on %s reports error=0x%02x\n", 376 + mouse->name, mouse->phys, error); 370 377 371 378 } 372 379 ··· 374 381 * If the mouse was hot-plugged, we need to force differential mode 375 382 * now... However, give it a second to recover from it's reset. 376 383 */ 377 - printk (KERN_NOTICE "%s on %s: Forceing standard packet format, " 378 - "incremental streaming mode and 72 samples/sec\n", 379 - mouse->name, mouse->phys); 380 - serio_write (mouse->serio, 'S'); /* Standard format */ 381 - mdelay (50); 382 - serio_write (mouse->serio, 'R'); /* Incremental */ 383 - mdelay (50); 384 - serio_write (mouse->serio, 'L'); /* 72 samples/sec */ 384 + printk(KERN_NOTICE 385 + "%s on %s: Forcing standard packet format, " 386 + "incremental streaming mode and 72 samples/sec\n", 387 + mouse->name, mouse->phys); 388 + serio_write(mouse->serio, 'S'); /* Standard format */ 389 + mdelay(50); 390 + serio_write(mouse->serio, 'R'); /* Incremental */ 391 + mdelay(50); 392 + serio_write(mouse->serio, 'L'); /* 72 samples/sec */ 385 393 } 386 394 387 - static void 388 - vsxxxaa_parse_buffer (struct vsxxxaa *mouse) 395 + static void vsxxxaa_parse_buffer(struct vsxxxaa *mouse) 389 396 { 390 397 unsigned char *buf = mouse->buf; 391 398 int stray_bytes; ··· 402 409 * activity on the mouse. 403 410 */ 404 411 while (mouse->count > 0 && !IS_HDR_BYTE(buf[0])) { 405 - printk (KERN_ERR "%s on %s: Dropping a byte to regain " 406 - "sync with mouse data stream...\n", 407 - mouse->name, mouse->phys); 408 - vsxxxaa_drop_bytes (mouse, 1); 412 + printk(KERN_ERR "%s on %s: Dropping a byte to regain " 413 + "sync with mouse data stream...\n", 414 + mouse->name, mouse->phys); 415 + vsxxxaa_drop_bytes(mouse, 1); 409 416 } 410 417 411 418 /* 412 419 * Check for packets we know about. 413 420 */ 414 421 415 - if (vsxxxaa_smells_like_packet (mouse, VSXXXAA_PACKET_REL, 3)) { 422 + if (vsxxxaa_smells_like_packet(mouse, VSXXXAA_PACKET_REL, 3)) { 416 423 /* Check for broken packet */ 417 - stray_bytes = vsxxxaa_check_packet (mouse, 3); 418 - if (stray_bytes > 0) { 419 - printk (KERN_ERR "Dropping %d bytes now...\n", 420 - stray_bytes); 421 - vsxxxaa_drop_bytes (mouse, stray_bytes); 422 - continue; 423 - } 424 + stray_bytes = vsxxxaa_check_packet(mouse, 3); 425 + if (!stray_bytes) 426 + vsxxxaa_handle_REL_packet(mouse); 424 427 425 - vsxxxaa_handle_REL_packet (mouse); 426 - continue; /* More to parse? */ 428 + } else if (vsxxxaa_smells_like_packet(mouse, 429 + VSXXXAA_PACKET_ABS, 5)) { 430 + /* Check for broken packet */ 431 + stray_bytes = vsxxxaa_check_packet(mouse, 5); 432 + if (!stray_bytes) 433 + vsxxxaa_handle_ABS_packet(mouse); 434 + 435 + } else if (vsxxxaa_smells_like_packet(mouse, 436 + VSXXXAA_PACKET_POR, 4)) { 437 + /* Check for broken packet */ 438 + stray_bytes = vsxxxaa_check_packet(mouse, 4); 439 + if (!stray_bytes) 440 + vsxxxaa_handle_POR_packet(mouse); 441 + 442 + } else { 443 + break; /* No REL, ABS or POR packet found */ 427 444 } 428 445 429 - if (vsxxxaa_smells_like_packet (mouse, VSXXXAA_PACKET_ABS, 5)) { 430 - /* Check for broken packet */ 431 - stray_bytes = vsxxxaa_check_packet (mouse, 5); 432 - if (stray_bytes > 0) { 433 - printk (KERN_ERR "Dropping %d bytes now...\n", 434 - stray_bytes); 435 - vsxxxaa_drop_bytes (mouse, stray_bytes); 436 - continue; 437 - } 438 - 439 - vsxxxaa_handle_ABS_packet (mouse); 440 - continue; /* More to parse? */ 446 + if (stray_bytes > 0) { 447 + printk(KERN_ERR "Dropping %d bytes now...\n", 448 + stray_bytes); 449 + vsxxxaa_drop_bytes(mouse, stray_bytes); 441 450 } 442 451 443 - if (vsxxxaa_smells_like_packet (mouse, VSXXXAA_PACKET_POR, 4)) { 444 - /* Check for broken packet */ 445 - stray_bytes = vsxxxaa_check_packet (mouse, 4); 446 - if (stray_bytes > 0) { 447 - printk (KERN_ERR "Dropping %d bytes now...\n", 448 - stray_bytes); 449 - vsxxxaa_drop_bytes (mouse, stray_bytes); 450 - continue; 451 - } 452 - 453 - vsxxxaa_handle_POR_packet (mouse); 454 - continue; /* More to parse? */ 455 - } 456 - 457 - break; /* No REL, ABS or POR packet found */ 458 452 } while (1); 459 453 } 460 454 461 - static irqreturn_t 462 - vsxxxaa_interrupt (struct serio *serio, unsigned char data, unsigned int flags) 455 + static irqreturn_t vsxxxaa_interrupt(struct serio *serio, 456 + unsigned char data, unsigned int flags) 463 457 { 464 - struct vsxxxaa *mouse = serio_get_drvdata (serio); 458 + struct vsxxxaa *mouse = serio_get_drvdata(serio); 465 459 466 - vsxxxaa_queue_byte (mouse, data); 467 - vsxxxaa_parse_buffer (mouse); 460 + vsxxxaa_queue_byte(mouse, data); 461 + vsxxxaa_parse_buffer(mouse); 468 462 469 463 return IRQ_HANDLED; 470 464 } 471 465 472 - static void 473 - vsxxxaa_disconnect (struct serio *serio) 466 + static void vsxxxaa_disconnect(struct serio *serio) 474 467 { 475 - struct vsxxxaa *mouse = serio_get_drvdata (serio); 468 + struct vsxxxaa *mouse = serio_get_drvdata(serio); 476 469 477 - serio_close (serio); 478 - serio_set_drvdata (serio, NULL); 479 - input_unregister_device (mouse->dev); 480 - kfree (mouse); 470 + serio_close(serio); 471 + serio_set_drvdata(serio, NULL); 472 + input_unregister_device(mouse->dev); 473 + kfree(mouse); 481 474 } 482 475 483 - static int 484 - vsxxxaa_connect (struct serio *serio, struct serio_driver *drv) 476 + static int vsxxxaa_connect(struct serio *serio, struct serio_driver *drv) 485 477 { 486 478 struct vsxxxaa *mouse; 487 479 struct input_dev *input_dev; 488 480 int err = -ENOMEM; 489 481 490 - mouse = kzalloc (sizeof (struct vsxxxaa), GFP_KERNEL); 491 - input_dev = input_allocate_device (); 482 + mouse = kzalloc(sizeof(struct vsxxxaa), GFP_KERNEL); 483 + input_dev = input_allocate_device(); 492 484 if (!mouse || !input_dev) 493 485 goto fail1; 494 486 495 487 mouse->dev = input_dev; 496 488 mouse->serio = serio; 497 - strlcat (mouse->name, "DEC VSXXX-AA/-GA mouse or VSXXX-AB digitizer", 498 - sizeof (mouse->name)); 499 - snprintf (mouse->phys, sizeof (mouse->phys), "%s/input0", serio->phys); 489 + strlcat(mouse->name, "DEC VSXXX-AA/-GA mouse or VSXXX-AB digitizer", 490 + sizeof(mouse->name)); 491 + snprintf(mouse->phys, sizeof(mouse->phys), "%s/input0", serio->phys); 500 492 501 493 input_dev->name = mouse->name; 502 494 input_dev->phys = mouse->phys; 503 495 input_dev->id.bustype = BUS_RS232; 504 496 input_dev->dev.parent = &serio->dev; 505 497 506 - set_bit (EV_KEY, input_dev->evbit); /* We have buttons */ 507 - set_bit (EV_REL, input_dev->evbit); 508 - set_bit (EV_ABS, input_dev->evbit); 509 - set_bit (BTN_LEFT, input_dev->keybit); /* We have 3 buttons */ 510 - set_bit (BTN_MIDDLE, input_dev->keybit); 511 - set_bit (BTN_RIGHT, input_dev->keybit); 512 - set_bit (BTN_TOUCH, input_dev->keybit); /* ...and Tablet */ 513 - set_bit (REL_X, input_dev->relbit); 514 - set_bit (REL_Y, input_dev->relbit); 515 - input_set_abs_params (input_dev, ABS_X, 0, 1023, 0, 0); 516 - input_set_abs_params (input_dev, ABS_Y, 0, 1023, 0, 0); 498 + __set_bit(EV_KEY, input_dev->evbit); /* We have buttons */ 499 + __set_bit(EV_REL, input_dev->evbit); 500 + __set_bit(EV_ABS, input_dev->evbit); 501 + __set_bit(BTN_LEFT, input_dev->keybit); /* We have 3 buttons */ 502 + __set_bit(BTN_MIDDLE, input_dev->keybit); 503 + __set_bit(BTN_RIGHT, input_dev->keybit); 504 + __set_bit(BTN_TOUCH, input_dev->keybit); /* ...and Tablet */ 505 + __set_bit(REL_X, input_dev->relbit); 506 + __set_bit(REL_Y, input_dev->relbit); 507 + input_set_abs_params(input_dev, ABS_X, 0, 1023, 0, 0); 508 + input_set_abs_params(input_dev, ABS_Y, 0, 1023, 0, 0); 517 509 518 - serio_set_drvdata (serio, mouse); 510 + serio_set_drvdata(serio, mouse); 519 511 520 - err = serio_open (serio, drv); 512 + err = serio_open(serio, drv); 521 513 if (err) 522 514 goto fail2; 523 515 ··· 510 532 * Request selftest. Standard packet format and differential 511 533 * mode will be requested after the device ID'ed successfully. 512 534 */ 513 - serio_write (serio, 'T'); /* Test */ 535 + serio_write(serio, 'T'); /* Test */ 514 536 515 - err = input_register_device (input_dev); 537 + err = input_register_device(input_dev); 516 538 if (err) 517 539 goto fail3; 518 540 519 541 return 0; 520 542 521 - fail3: serio_close (serio); 522 - fail2: serio_set_drvdata (serio, NULL); 523 - fail1: input_free_device (input_dev); 524 - kfree (mouse); 543 + fail3: serio_close(serio); 544 + fail2: serio_set_drvdata(serio, NULL); 545 + fail1: input_free_device(input_dev); 546 + kfree(mouse); 525 547 return err; 526 548 } 527 549 ··· 548 570 .disconnect = vsxxxaa_disconnect, 549 571 }; 550 572 551 - static int __init 552 - vsxxxaa_init (void) 573 + static int __init vsxxxaa_init(void) 553 574 { 554 575 return serio_register_driver(&vsxxxaa_drv); 555 576 } 556 577 557 - static void __exit 558 - vsxxxaa_exit (void) 578 + static void __exit vsxxxaa_exit(void) 559 579 { 560 580 serio_unregister_driver(&vsxxxaa_drv); 561 581 } 562 582 563 - module_init (vsxxxaa_init); 564 - module_exit (vsxxxaa_exit); 583 + module_init(vsxxxaa_init); 584 + module_exit(vsxxxaa_exit); 565 585