static const struct of_device_id cif_of_match[] = {
{ .compatible = "rockchip,isp" },
+ { /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, cif_of_match);
1) support drm iommu.
*v0.0x21.7:
* 1) remove memset function wrong called code.
+*v0.0x21.8:
+* 1) flash module exist risk, fix up it.
*/
-#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0, 0x21, 7)
+#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0, 0x21, 8)
#define CAMSYS_PLATFORM_DRV_NAME "RockChip-CamSys"
#define CAMSYS_PLATFORM_MARVIN_NAME "Platform_MarvinDev"
spinlock_t io_lock;
unsigned char suspend:1;
int in_use_mode;
+ struct platform_device rt_fled_pdev;
#ifdef CONFIG_DEBUG_FS
struct flashlight_device *fled_dev;
unsigned char reg_addr;
rt8547_reg_initval[RT8547_FLED_REG3 - 1]);
}
-static struct platform_device rt_fled_pdev = {
- .name = "rt-flash-led",
- .id = -1,
-};
+static void rt8547_release(struct device *dev)
+{
+}
static int rt8547_led_probe(struct platform_device *pdev)
{
chip->base.hal = &rt8547_fled_hal;
chip->base.init_props = &rt8547_fled_props;
- rt_fled_pdev.dev.parent = &pdev->dev;
- ret = platform_device_register(&rt_fled_pdev);
+ chip->rt_fled_pdev.dev.parent = &pdev->dev;
+ chip->rt_fled_pdev.dev.release = rt8547_release;
+ chip->rt_fled_pdev.name = "rt-flash-led";
+ chip->rt_fled_pdev.id = -1;
+ ret = platform_device_register(&chip->rt_fled_pdev);
if (ret < 0) {
dev_err(&pdev->dev, "register rtfled fail\n");
goto err_io;
#ifdef CONFIG_DEBUG_FS
rt8547_remove_debugfs();
#endif /* #ifdef CONFIG_DEBUG_FS */
- platform_device_unregister(&rt_fled_pdev);
+ platform_device_unregister(&chip->rt_fled_pdev);
rt8547_io_deinit(chip->pdata);
return 0;
}
INIT_LIST_HEAD(&g_ext_fsh_devs.dev_list);
return 0;
}
+
+static void camsys_ext_fsh_release(struct device *dev)
+{
+}
+
void* camsys_register_ext_fsh_dev(camsys_flash_info_t *fsh_info)
{
ext_fsh_info_t* new_dev = NULL;
goto fail0;
}
- new_rt_dev = kzalloc(sizeof(ext_fsh_info_t),GFP_KERNEL);
+ new_rt_dev = kzalloc(sizeof(*new_rt_dev), GFP_KERNEL);
if(!new_rt_dev){
camsys_err("register new ext flash dev erro !");
goto fail1;
new_dev->pdev.id = -1;
new_dev->pdev.name = fsh_info->fl_drv_name;
+ new_dev->pdev.dev.release = camsys_ext_fsh_release;
new_dev->pdev.dev.platform_data = (void*)new_rt_dev;
new_dev->dev_model = "rt-flash-led";
/* free after unregister device ?*/
kfree(cur_fsh_info->pdev.dev.platform_data);
kfree(cur_fsh_info);
+ return 0;
}
}
}