drm/vc4: Use devm_drm_dev_alloc
We can simplify a bit the bind code, its error path and unbind by using the managed devm_drm_dev_alloc function. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20201029190104.2181730-5-maxime@cerno.tech
This commit is contained in:
@@ -72,7 +72,7 @@ struct vc4_perfmon {
|
||||
};
|
||||
|
||||
struct vc4_dev {
|
||||
struct drm_device *dev;
|
||||
struct drm_device base;
|
||||
|
||||
struct vc4_hvs *hvs;
|
||||
struct vc4_v3d *v3d;
|
||||
@@ -235,7 +235,7 @@ struct vc4_dev {
|
||||
static inline struct vc4_dev *
|
||||
to_vc4_dev(struct drm_device *dev)
|
||||
{
|
||||
return (struct vc4_dev *)dev->dev_private;
|
||||
return container_of(dev, struct vc4_dev, base);
|
||||
}
|
||||
|
||||
struct vc4_bo {
|
||||
|
Reference in New Issue
Block a user