diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-09 19:38:14 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-09 19:38:14 -0500 |
| commit | b790f5d1260b4c962bd066cd34ae982943c27fe1 (patch) | |
| tree | 26170acf36f899b32c6bbf999b9933f275519bce /include/linux/usb | |
| parent | cd4946188aac597d187a765127fd26fa3644c29f (diff) | |
USB: serial: use module_driver() macro
Now that module_driver() can handle varargs, use it instead of rolling
our own version.
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
| -rw-r--r-- | include/linux/usb/serial.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 7b1db841e2a..fbb666b1b67 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
| @@ -416,23 +416,10 @@ do { \ | |||
| 416 | * module may only use this macro once, and calling it replaces | 416 | * module may only use this macro once, and calling it replaces |
| 417 | * module_init() and module_exit() | 417 | * module_init() and module_exit() |
| 418 | * | 418 | * |
| 419 | * Note, we can't use the generic module_driver() call here, due to the | ||
| 420 | * two parameters in the usb_serial_* functions, so we roll our own here | ||
| 421 | * :( | ||
| 422 | */ | 419 | */ |
| 423 | #define module_usb_serial_driver(__usb_driver, __serial_drivers) \ | 420 | #define module_usb_serial_driver(__usb_driver, __serial_drivers) \ |
| 424 | static int __init usb_serial_driver_init(void) \ | 421 | module_driver(__usb_driver, usb_serial_register_drivers, \ |
| 425 | { \ | 422 | usb_serial_deregister_drivers, __serial_drivers) |
| 426 | return usb_serial_register_drivers(&(__usb_driver), \ | ||
| 427 | (__serial_drivers)); \ | ||
| 428 | } \ | ||
| 429 | module_init(usb_serial_driver_init); \ | ||
| 430 | static void __exit usb_serial_driver_exit(void) \ | ||
| 431 | { \ | ||
| 432 | return usb_serial_deregister_drivers(&(__usb_driver), \ | ||
| 433 | (__serial_drivers)); \ | ||
| 434 | } \ | ||
| 435 | module_exit(usb_serial_driver_exit); | ||
| 436 | 423 | ||
| 437 | #endif /* __LINUX_USB_SERIAL_H */ | 424 | #endif /* __LINUX_USB_SERIAL_H */ |
| 438 | 425 | ||
