drm/ast: Upcast from DRM device to ast structure via to_ast_private()
All upcasting from struct drm_device to struct ast_private is now performed via to_ast_private(). Using struct drm_device.dev_private is deprecated. The ast variable in ast_crtc_helper_atomic_check() is unused, so removed it. v2: * fix typo in commit message Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200617080340.29584-4-tzimmermann@suse.de
This commit is contained in:
@@ -67,7 +67,7 @@ uint8_t ast_get_index_reg_mask(struct ast_private *ast,
|
||||
static void ast_detect_config_mode(struct drm_device *dev, u32 *scu_rev)
|
||||
{
|
||||
struct device_node *np = dev->pdev->dev.of_node;
|
||||
struct ast_private *ast = dev->dev_private;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
uint32_t data, jregd0, jregd1;
|
||||
|
||||
/* Defaults */
|
||||
@@ -117,7 +117,7 @@ static void ast_detect_config_mode(struct drm_device *dev, u32 *scu_rev)
|
||||
|
||||
static int ast_detect_chip(struct drm_device *dev, bool *need_post)
|
||||
{
|
||||
struct ast_private *ast = dev->dev_private;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
uint32_t jreg, scu_rev;
|
||||
|
||||
/*
|
||||
@@ -262,7 +262,7 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)
|
||||
static int ast_get_dram_info(struct drm_device *dev)
|
||||
{
|
||||
struct device_node *np = dev->pdev->dev.of_node;
|
||||
struct ast_private *ast = dev->dev_private;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
uint32_t mcr_cfg, mcr_scu_mpll, mcr_scu_strap;
|
||||
uint32_t denum, num, div, ref_pll, dsel;
|
||||
|
||||
@@ -388,7 +388,7 @@ static const struct drm_mode_config_funcs ast_mode_funcs = {
|
||||
|
||||
static u32 ast_get_vram_info(struct drm_device *dev)
|
||||
{
|
||||
struct ast_private *ast = dev->dev_private;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
u8 jreg;
|
||||
u32 vram_size;
|
||||
ast_open_key(ast);
|
||||
@@ -509,7 +509,7 @@ out_free:
|
||||
|
||||
void ast_driver_unload(struct drm_device *dev)
|
||||
{
|
||||
struct ast_private *ast = dev->dev_private;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
|
||||
/* enable standard VGA decode */
|
||||
ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa1, 0x04);
|
||||
|
Reference in New Issue
Block a user