Skip to content

Commit

Permalink
[media] drivers: media: use module_platform_driver_probe()
Browse files Browse the repository at this point in the history
This patch converts the drivers to use the
module_platform_driver_probe() macro which makes the code smaller and
a bit simpler.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
[g.liakhovetski@gmx.de: also remove redundant .probe initialisation]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Fabio Porcedda authored and Mauro Carvalho Chehab committed Apr 4, 2013
1 parent 2400a1f commit 8c31aec
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/media/platform/soc_camera/atmel-isi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1074,25 +1074,14 @@ static int atmel_isi_probe(struct platform_device *pdev)
}

static struct platform_driver atmel_isi_driver = {
.probe = atmel_isi_probe,
.remove = atmel_isi_remove,
.driver = {
.name = "atmel_isi",
.owner = THIS_MODULE,
},
};

static int __init atmel_isi_init_module(void)
{
return platform_driver_probe(&atmel_isi_driver, &atmel_isi_probe);
}

static void __exit atmel_isi_exit(void)
{
platform_driver_unregister(&atmel_isi_driver);
}
module_init(atmel_isi_init_module);
module_exit(atmel_isi_exit);
module_platform_driver_probe(atmel_isi_driver, atmel_isi_probe);

MODULE_AUTHOR("Josh Wu <josh.wu@atmel.com>");
MODULE_DESCRIPTION("The V4L2 driver for Atmel Linux");
Expand Down

0 comments on commit 8c31aec

Please sign in to comment.