mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
media: rockchip: cif: add module exit to fix the failure of rmmod video_rkcif
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> Change-Id: I97fc14eb411339796dfc58b28460ed00cd898814
This commit is contained in:
@@ -1009,7 +1009,6 @@ static struct platform_driver rkcif_hw_plat_drv = {
|
||||
.remove = rkcif_plat_remove,
|
||||
};
|
||||
|
||||
#ifdef MODULE
|
||||
static int __init rk_cif_plat_drv_init(void)
|
||||
{
|
||||
int ret;
|
||||
@@ -1020,10 +1019,14 @@ static int __init rk_cif_plat_drv_init(void)
|
||||
return rkcif_csi2_plat_drv_init();
|
||||
}
|
||||
|
||||
static void __exit rk_cif_plat_drv_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&rkcif_hw_plat_drv);
|
||||
rkcif_csi2_plat_drv_exit();
|
||||
}
|
||||
|
||||
module_init(rk_cif_plat_drv_init);
|
||||
#else
|
||||
module_platform_driver(rkcif_hw_plat_drv);
|
||||
#endif
|
||||
module_exit(rk_cif_plat_drv_exit);
|
||||
|
||||
MODULE_AUTHOR("Rockchip Camera/ISP team");
|
||||
MODULE_DESCRIPTION("Rockchip CIF platform driver");
|
||||
|
||||
@@ -1039,14 +1039,15 @@ static struct platform_driver csi2_driver = {
|
||||
.remove = csi2_remove,
|
||||
};
|
||||
|
||||
#ifdef MODULE
|
||||
int __init rkcif_csi2_plat_drv_init(void)
|
||||
{
|
||||
return platform_driver_register(&csi2_driver);
|
||||
}
|
||||
#else
|
||||
module_platform_driver(csi2_driver);
|
||||
#endif
|
||||
|
||||
void __exit rkcif_csi2_plat_drv_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&csi2_driver);
|
||||
}
|
||||
|
||||
MODULE_DESCRIPTION("Rockchip MIPI CSI2 driver");
|
||||
MODULE_AUTHOR("Macrofly.xu <xuhf@rock-chips.com>");
|
||||
|
||||
@@ -12,6 +12,7 @@ u32 rkcif_csi2_get_sof(void);
|
||||
void rkcif_csi2_set_sof(u32 seq);
|
||||
void rkcif_csi2_event_inc_sof(void);
|
||||
int __init rkcif_csi2_plat_drv_init(void);
|
||||
void __exit rkcif_csi2_plat_drv_exit(void);
|
||||
int rkcif_csi2_register_notifier(struct notifier_block *nb);
|
||||
int rkcif_csi2_unregister_notifier(struct notifier_block *nb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user