From: Wei Yongjun Date: Wed, 10 Oct 2012 13:04:58 +0000 (+0800) Subject: pch_dma: use module_pci_driver to simplify the code X-Git-Tag: upstream/snapshot3+hdmi~5581^2~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53b9989bc75e185d0bf946e939ebe8534c8a9740;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git pch_dma: use module_pci_driver to simplify the code Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c index eca1c4d..aed6e0c 100644 --- a/drivers/dma/pch_dma.c +++ b/drivers/dma/pch_dma.c @@ -1029,18 +1029,7 @@ static struct pci_driver pch_dma_driver = { #endif }; -static int __init pch_dma_init(void) -{ - return pci_register_driver(&pch_dma_driver); -} - -static void __exit pch_dma_exit(void) -{ - pci_unregister_driver(&pch_dma_driver); -} - -module_init(pch_dma_init); -module_exit(pch_dma_exit); +module_pci_driver(pch_dma_driver); MODULE_DESCRIPTION("Intel EG20T PCH / LAPIS Semicon ML7213/ML7223/ML7831 IOH " "DMA controller driver");