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

[media] s5p-jpeg: Use module_platform_driver in jpeg-core.c file

module_platform_driver makes the code simpler by eliminating module_init
and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Sachin Kamat and committed by
Mauro Carvalho Chehab
87e94294 91268a5e

+1 -23
+1 -23
drivers/media/video/s5p-jpeg/jpeg-core.c
··· 1503 1503 }, 1504 1504 }; 1505 1505 1506 - static int __init 1507 - s5p_jpeg_register(void) 1508 - { 1509 - int ret; 1510 - 1511 - pr_info("S5P JPEG V4L2 Driver, (c) 2011 Samsung Electronics\n"); 1512 - 1513 - ret = platform_driver_register(&s5p_jpeg_driver); 1514 - 1515 - if (ret) 1516 - pr_err("%s: failed to register jpeg driver\n", __func__); 1517 - 1518 - return ret; 1519 - } 1520 - 1521 - static void __exit 1522 - s5p_jpeg_unregister(void) 1523 - { 1524 - platform_driver_unregister(&s5p_jpeg_driver); 1525 - } 1526 - 1527 - module_init(s5p_jpeg_register); 1528 - module_exit(s5p_jpeg_unregister); 1506 + module_platform_driver(s5p_jpeg_driver); 1529 1507 1530 1508 MODULE_AUTHOR("Andrzej Pietrasiewicz <andrzej.p@samsung.com>"); 1531 1509 MODULE_DESCRIPTION("Samsung JPEG codec driver");