From fbe01716ed4a93ff90a289c2b75313319bf08573 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Thu, 30 Jul 2020 15:52:00 +0200 Subject: drm/ast: Replace driver load/unload functions with device create/destroy The ast driver's load and unload functions are left-overs from when struct drm_driver.load/unload was still in use. The PCI probe helper allocated the DRM device and ran load to initialize it. This patch replaces this code with device create and destroy. The main difference is that the device's create function allocates the DRM device and ast structures in the same place. This will be required for switching ast to managed allocations. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-4-tzimmermann@suse.de --- drivers/gpu/drm/ast/ast_drv.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/drm/ast/ast_drv.h') diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h index e7564055fa70..210d62f69fb9 100644 --- a/drivers/gpu/drm/ast/ast_drv.h +++ b/drivers/gpu/drm/ast/ast_drv.h @@ -159,8 +159,10 @@ static inline struct ast_private *to_ast_private(struct drm_device *dev) return dev->dev_private; } -int ast_driver_load(struct drm_device *dev, unsigned long flags); -void ast_driver_unload(struct drm_device *dev); +struct ast_private *ast_device_create(struct drm_driver *drv, + struct pci_dev *pdev, + unsigned long flags); +void ast_device_destroy(struct ast_private *ast); #define AST_IO_AR_PORT_WRITE (0x40) #define AST_IO_MISC_PORT_WRITE (0x42) -- cgit v1.2.3-59-g8ed1b