diff mbox

xen-platform: use builtin_pci_driver

Message ID e8cccdc13309ff26c713556d0b5eab0281d740d6.1479127837.git.geliangtang@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Geliang Tang Nov. 14, 2016, 12:52 p.m. UTC
Use builtin_pci_driver() helper to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 drivers/xen/platform-pci.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Jürgen Groß Nov. 15, 2016, 6:41 a.m. UTC | #1
On 14/11/16 13:52, Geliang Tang wrote:
> Use builtin_pci_driver() helper to simplify the code.
> 
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>

Reviewed-by: Juergen Gross <jgross@suse.com>

> ---
>  drivers/xen/platform-pci.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
> index b59c9455..112ce42 100644
> --- a/drivers/xen/platform-pci.c
> +++ b/drivers/xen/platform-pci.c
> @@ -125,8 +125,4 @@ static struct pci_driver platform_driver = {
>  	.id_table =       platform_pci_tbl,
>  };
>  
> -static int __init platform_pci_init(void)
> -{
> -	return pci_register_driver(&platform_driver);
> -}
> -device_initcall(platform_pci_init);
> +builtin_pci_driver(platform_driver);
>
Jürgen Groß Nov. 17, 2016, 12:49 p.m. UTC | #2
On 14/11/16 13:52, Geliang Tang wrote:
> Use builtin_pci_driver() helper to simplify the code.
> 
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>

Applied to xen/tip.git for-linus-4.10


Juergen

> ---
>  drivers/xen/platform-pci.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
> index b59c9455..112ce42 100644
> --- a/drivers/xen/platform-pci.c
> +++ b/drivers/xen/platform-pci.c
> @@ -125,8 +125,4 @@ static struct pci_driver platform_driver = {
>  	.id_table =       platform_pci_tbl,
>  };
>  
> -static int __init platform_pci_init(void)
> -{
> -	return pci_register_driver(&platform_driver);
> -}
> -device_initcall(platform_pci_init);
> +builtin_pci_driver(platform_driver);
>
diff mbox

Patch

diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
index b59c9455..112ce42 100644
--- a/drivers/xen/platform-pci.c
+++ b/drivers/xen/platform-pci.c
@@ -125,8 +125,4 @@  static struct pci_driver platform_driver = {
 	.id_table =       platform_pci_tbl,
 };
 
-static int __init platform_pci_init(void)
-{
-	return pci_register_driver(&platform_driver);
-}
-device_initcall(platform_pci_init);
+builtin_pci_driver(platform_driver);