media: staging: media: zoran: use module_pci_driver

Simplify code by using module_pci_driver()

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
Corentin Labbe 2021-12-14 17:16:20 +01:00 committed by Mauro Carvalho Chehab
parent 4d4389f64c
commit b419ee9468

View File

@ -1314,23 +1314,4 @@ static struct pci_driver zoran_driver = {
.remove = zoran_remove,
};
static int __init zoran_init(void)
{
int res;
res = pci_register_driver(&zoran_driver);
if (res) {
pr_err("Unable to register ZR36057 driver\n");
return res;
}
return 0;
}
static void __exit zoran_exit(void)
{
pci_unregister_driver(&zoran_driver);
}
module_init(zoran_init);
module_exit(zoran_exit);
module_pci_driver(zoran_driver);