Skip to content

Commit

Permalink
uio: convert drivers/uio/* to use module_platform_driver()
Browse files Browse the repository at this point in the history
This patch converts the drivers in drivers/uio/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Cc: Magnus Damm <damm@igel.co.jp>
Cc: Amit Chatterjee <amit.chatterjee@ti.com>
Cc: Pratheesh Gangadhar <pratheesh@ti.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Axel Lin authored and Greg Kroah-Hartman committed Nov 27, 2011
1 parent ccbc60d commit 11e3123
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 36 deletions.
12 changes: 1 addition & 11 deletions drivers/uio/uio_pdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,7 @@ static struct platform_driver uio_pdrv = {
},
};

static int __init uio_pdrv_init(void)
{
return platform_driver_register(&uio_pdrv);
}

static void __exit uio_pdrv_exit(void)
{
platform_driver_unregister(&uio_pdrv);
}
module_init(uio_pdrv_init);
module_exit(uio_pdrv_exit);
module_platform_driver(uio_pdrv);

MODULE_AUTHOR("Uwe Kleine-Koenig");
MODULE_DESCRIPTION("Userspace I/O platform driver");
Expand Down
13 changes: 1 addition & 12 deletions drivers/uio/uio_pdrv_genirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,18 +273,7 @@ static struct platform_driver uio_pdrv_genirq = {
},
};

static int __init uio_pdrv_genirq_init(void)
{
return platform_driver_register(&uio_pdrv_genirq);
}

static void __exit uio_pdrv_genirq_exit(void)
{
platform_driver_unregister(&uio_pdrv_genirq);
}

module_init(uio_pdrv_genirq_init);
module_exit(uio_pdrv_genirq_exit);
module_platform_driver(uio_pdrv_genirq);

MODULE_AUTHOR("Magnus Damm");
MODULE_DESCRIPTION("Userspace I/O platform driver with generic IRQ handling");
Expand Down
14 changes: 1 addition & 13 deletions drivers/uio/uio_pruss.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,19 +227,7 @@ static struct platform_driver pruss_driver = {
},
};

static int __init pruss_init_module(void)
{
return platform_driver_register(&pruss_driver);
}

module_init(pruss_init_module);

static void __exit pruss_exit_module(void)
{
platform_driver_unregister(&pruss_driver);
}

module_exit(pruss_exit_module);
module_platform_driver(pruss_driver);

MODULE_LICENSE("GPL v2");
MODULE_VERSION(DRV_VERSION);
Expand Down

0 comments on commit 11e3123

Please sign in to comment.