lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 05 Apr 2012 10:19:16 -0700
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Axel Lin <axel.lin@...il.com>, linux-kernel@...r.kernel.org
Cc:	Eric Miao <eric.y.miao@...il.com>,
	Haojian Zhuang <haojian.zhuang@...il.com>,
	spi-devel-general@...ts.sourceforge.net
Subject: Re: [PATCH] spi: use module_pci_driver

On Wed, 04 Apr 2012 22:29:32 +0800, Axel Lin <axel.lin@...il.com> wrote:
> This patch converts the drivers in drivers/spi/* to use module_pci_driver()
> macro which makes the code smaller and a bit simpler.
> 
> Signed-off-by: Axel Lin <axel.lin@...il.com>

Applied, thanks.

g.

> ---
>  drivers/spi/spi-dw-pci.c     |   13 +------------
>  drivers/spi/spi-pxa2xx-pci.c |   12 +-----------
>  2 files changed, 2 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/spi/spi-dw-pci.c b/drivers/spi/spi-dw-pci.c
> index 14f7cc9..ff81abb 100644
> --- a/drivers/spi/spi-dw-pci.c
> +++ b/drivers/spi/spi-dw-pci.c
> @@ -164,18 +164,7 @@ static struct pci_driver dw_spi_driver = {
>  	.resume	=	spi_resume,
>  };
>  
> -static int __init mrst_spi_init(void)
> -{
> -	return pci_register_driver(&dw_spi_driver);
> -}
> -
> -static void __exit mrst_spi_exit(void)
> -{
> -	pci_unregister_driver(&dw_spi_driver);
> -}
> -
> -module_init(mrst_spi_init);
> -module_exit(mrst_spi_exit);
> +module_pci_driver(dw_spi_driver);
>  
>  MODULE_AUTHOR("Feng Tang <feng.tang@...el.com>");
>  MODULE_DESCRIPTION("PCI interface driver for DW SPI Core");
> diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c
> index 3fb44af..9f6ba34 100644
> --- a/drivers/spi/spi-pxa2xx-pci.c
> +++ b/drivers/spi/spi-pxa2xx-pci.c
> @@ -164,17 +164,7 @@ static struct pci_driver ce4100_spi_driver = {
>  	.remove         = __devexit_p(ce4100_spi_remove),
>  };
>  
> -static int __init ce4100_spi_init(void)
> -{
> -	return pci_register_driver(&ce4100_spi_driver);
> -}
> -module_init(ce4100_spi_init);
> -
> -static void __exit ce4100_spi_exit(void)
> -{
> -	pci_unregister_driver(&ce4100_spi_driver);
> -}
> -module_exit(ce4100_spi_exit);
> +module_pci_driver(ce4100_spi_driver);
>  
>  MODULE_DESCRIPTION("CE4100 PCI-SPI glue code for PXA's driver");
>  MODULE_LICENSE("GPL v2");
> -- 
> 1.7.5.4
> 
> 
> 

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ