From patchwork Tue Aug 20 23:06:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 171870 Delivered-To: patches@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp180155ily; Tue, 20 Aug 2019 16:06:47 -0700 (PDT) X-Received: by 2002:aa7:991a:: with SMTP id z26mr28482954pff.43.1566342407498; Tue, 20 Aug 2019 16:06:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566342407; cv=none; d=google.com; s=arc-20160816; b=N2r9iZOhS1lS06p7+EvuZcuZuJiaKK3GIdfyObAF/0l/qjOZmvgyRo3y7fMdgoE0/u maVxJS8/THcf1mEh63MjN3PLvb2Qu6bBaJebKnStJktgwsvrOU+rpRlgok85gknEoUeK Y6wtEaZXxx5fjUd0Laq6B8QPcxwiX7eg0y06xTC2Pc1/I+rs28A4qVWbH5CWR4Uq27eb mxQ2+b8elWFktzeQAJkxjBB8FcDIdOQbCgfYm38z9pcnYkHd1hd+w9V9JCgU7st2MtfV G7XbDXfhCjbBrEuQtFl7InD9mAnoS/v5OXmtyiCpX4tiKA1WNRhXoC6t1v1U97WJkVAo WLvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jrafS1xNw8QuY6208vzcwdkt7ZoMFEpwTrneiMG+q3Y=; b=rWoImgCFojFoKhdBliWEeVCu67f/reCo/bCIT94JwjxjzY2JtFvB75yUQQl2g0Khx9 UuvvgieWbmmeBisvyQqKDtcVltBuaUjk5LL8tXGzcAfReFmONf+FKxyUOl4MUgwAWJE/ pasQpK1BPRuNehGKMFmrPUYFDuTLOJ4P1qN0R1uZ9omQiGhMybbkDSyo5EWGh3gfmfyj AQfHsLuKb6aZErDlH9SxPu7NoY7VUtg2drcD8a14hjugt/ayMOTTTSJ51oknRYZNnbey OIe7lY84shkiqlXi48ns21aNdcmFtFswuVP8ZNbm5iOYP05/DCM+h3Gd6azxm8pO0iaB dgRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x3n3QKSm; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id t1sor1797311pjv.17.2019.08.20.16.06.47 for (Google Transport Security); Tue, 20 Aug 2019 16:06:47 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x3n3QKSm; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jrafS1xNw8QuY6208vzcwdkt7ZoMFEpwTrneiMG+q3Y=; b=x3n3QKSmp9O/+aB+dueAM4VMGwlrka/AjLuZQIGhfTSRJL3h02hR4DaP89vrNglcLI aODrVQVO3nmXcjujtmB3WzPKUMa+WmElxF3+if7c1eZP01jl8XqgpnGczM6DmIkXpkQH ptOIvlb9Q1cpl3/EqkR7Pydd77uHQKpN5/2+Ik3+M6wm/RRUGhCYtfKI/RdDrCEbHNs8 +rNB2vyOBpyF33L/rs1vEeWPRRAsSdUsKuycuh+Y/uluizXm1IMZFFpwNAAZEYHnTEFy nqJihsNLgRZJ4mo3uEYtpqusja+UoX7Z2if/FpH2vg1OTMR7qiTnJJ03u/WdDYnr0FDW 8o+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jrafS1xNw8QuY6208vzcwdkt7ZoMFEpwTrneiMG+q3Y=; b=TNKN/kkrDZZwMEUs80+U+8G1QIH9iu3Nwr3V0kQV+kwcrIABNxYJJHWv84R67OU6a1 md1k6Evedp4liSOJKTXAT0vChuI59W2R60IYxVtWe4XVd7ASSumi5DkjBZuhBNP+GBCq VWaaUZGKAsOcGhtqlUNXR/jF/Ootg8AHwK8jYcFzVVqa/sK5qCGsl6a8yd6vsOPYHhf9 rnIubS6QFWJhEDpDCsmoGW850Wx04uzxGyYcdtnSLQ6s8nBvkMpr7ExA4AzoCRVkZXua CmInsDrKg41gds40p69la13ON7Pp2gmZUAiWHDUHzROo4pzPvKdEZ9iG9SoIV5q7/pBW JjKQ== X-Gm-Message-State: APjAAAXTeJYbz1NxgxexOge/lAL9qJUglEtmNFw+hSykHdIDwfjNfyZM aqsqdvYYKj3J7mY7IcDy3N4xAvng X-Google-Smtp-Source: APXvYqyquopmDIvJN+OnfrRPasNzNke/5ztk9S/nht4GczZwiyytgvvzq6gNRK0k3RRvbAzdh+5hmA== X-Received: by 2002:a17:90a:f995:: with SMTP id cq21mr2408433pjb.27.1566342407060; Tue, 20 Aug 2019 16:06:47 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id q4sm27564747pff.183.2019.08.20.16.06.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 16:06:46 -0700 (PDT) From: John Stultz To: lkml Cc: Xu YiPing , Rongrong Zou , Xinliang Liu , David Airlie , Daniel Vetter , dri-devel , Sam Ravnborg , John Stultz Subject: [PATCH v5 12/25] drm: kirin: Reanme dc_ops to kirin_drm_data Date: Tue, 20 Aug 2019 23:06:13 +0000 Message-Id: <20190820230626.23253-13-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190820230626.23253-1-john.stultz@linaro.org> References: <20190820230626.23253-1-john.stultz@linaro.org> From: Xu YiPing As part of refactoring the kirin driver to better support different hardware revisions, this patch renames the struct kirin_dc_ops to struct kirin_drm_data and cleans up the related variable names. Cc: Rongrong Zou Cc: Xinliang Liu Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel Cc: Sam Ravnborg Acked-by: Xinliang Liu Reviewed-by: Sam Ravnborg Signed-off-by: Xu YiPing [jstultz: reworded commit message] Signed-off-by: John Stultz --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 2 +- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 16 ++++++++-------- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) -- 2.17.1 diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index 3fbf099597c1..4c6646dfc465 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c @@ -1055,7 +1055,7 @@ static void ade_drm_cleanup(struct platform_device *pdev) { } -const struct kirin_dc_ops ade_dc_ops = { +struct kirin_drm_data ade_driver_data = { .init = ade_drm_init, .cleanup = ade_drm_cleanup }; diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c index fcdd6b1e167d..3d22f944a840 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c @@ -29,12 +29,12 @@ #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; @@ -68,7 +68,7 @@ static int kirin_drm_kms_init(struct drm_device *dev) 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; @@ -99,7 +99,7 @@ static int kirin_drm_kms_init(struct drm_device *dev) 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); @@ -194,8 +194,8 @@ static int kirin_drm_platform_probe(struct platform_device *pdev) 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; } @@ -213,13 +213,13 @@ static int kirin_drm_platform_probe(struct platform_device *pdev) 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 */ }, }; diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h index d47cbb427979..cd2eaa653db7 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h @@ -34,11 +34,11 @@ struct kirin_plane { }; /* 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__ */