#include "kirin_drm_drv.h"
-static struct kirin_dc_ops *dc_ops;
+static struct kirin_drm_data *driver_data;
static int kirin_drm_kms_cleanup(struct drm_device *dev)
{
drm_kms_helper_poll_fini(dev);
- dc_ops->cleanup(to_platform_device(dev->dev));
+ driver_data->cleanup(to_platform_device(dev->dev));
drm_mode_config_cleanup(dev);
return 0;
kirin_drm_mode_config_init(dev);
/* display controller init */
- ret = dc_ops->init(to_platform_device(dev->dev));
+ ret = driver_data->init(to_platform_device(dev->dev));
if (ret)
goto err_mode_config_cleanup;
err_unbind_all:
component_unbind_all(dev->dev, dev);
err_dc_cleanup:
- dc_ops->cleanup(to_platform_device(dev->dev));
+ driver_data->cleanup(to_platform_device(dev->dev));
err_mode_config_cleanup:
drm_mode_config_cleanup(dev);
struct component_match *match = NULL;
struct device_node *remote;
- dc_ops = (struct kirin_dc_ops *)of_device_get_match_data(dev);
- if (!dc_ops) {
+ driver_data = (struct kirin_drm_data *)of_device_get_match_data(dev);
+ if (!driver_data) {
DRM_ERROR("failed to get dt id data\n");
return -EINVAL;
}
static int kirin_drm_platform_remove(struct platform_device *pdev)
{
component_master_del(&pdev->dev, &kirin_drm_ops);
- dc_ops = NULL;
+ driver_data = NULL;
return 0;
}
static const struct of_device_id kirin_drm_dt_ids[] = {
{ .compatible = "hisilicon,hi6220-ade",
- .data = &ade_dc_ops,
+ .data = &ade_driver_data,
},
{ /* end node */ },
};
};
/* display controller init/cleanup ops */
-struct kirin_dc_ops {
+struct kirin_drm_data {
int (*init)(struct platform_device *pdev);
void (*cleanup)(struct platform_device *pdev);
};
-extern const struct kirin_dc_ops ade_dc_ops;
+extern struct kirin_drm_data ade_driver_data;
#endif /* __KIRIN_DRM_DRV_H__ */