From patchwork Wed Aug 14 18:46:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 171341 Delivered-To: patches@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1203199ily; Wed, 14 Aug 2019 11:47:27 -0700 (PDT) X-Received: by 2002:a65:430b:: with SMTP id j11mr458819pgq.383.1565808447366; Wed, 14 Aug 2019 11:47:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565808447; cv=none; d=google.com; s=arc-20160816; b=Te7TA7/Ro2TE/BW3Sm16OlJU+IVnzbGCDmXLa690eLWGlbcc0U/nlNLFAE9BERu5M5 HWe4zhQndJcCEcwr9yMUCdXMmvNDG1KPXsdAJA03QHkQVAFAPhLQO/Fu1fIHk0i1l+lx EiWaQgr+urOGh2E/XJWeNrqr8RqRH+NINMAfbw5xwH3h6fE4WvnkzIWg7hE1cmvOma0i KP+ehVh6uxO3eNOTnjooDl0w+s5p+1lAPKhOnPYc04Kv05QNVPv0vRBPWQybS9/WOYnt Yk5Hr3FwRCZMA9phDkTcqbtb7HDHT6cvbmhZFXGT3n9opRYD8sINDXWYP4NEq17awPaL 7NgQ== 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=sfKXX+o4Qp2/I5oLyNwYp5frrb8P6SiEjD+Gvi5BkT0=; b=wbbDGYG2wEXs1nEVCrnpKtgxDWGOpzRquh6aZhIPll517YOmrwVXoyRnm3AIz01Y6W 6Q1sTeUHSHzEYfDFEW5+Hx662zrriCqtM9Tw2pID0pD37TZTOV6xhNy6h1yMKB05wvKd FK8PE7/ao5C00li+WkD0MLL5h9rW3Sr5pm6OzbQhp6tZvS7vogHZkNDCb2g0RlA9sJ9y UHVdQn6co829+cujF3MIiqbvUAhu+PFdfvH4Mg7j0LPQc0XSnoZz96eyo30psqa/pDGz L7rHuwBtoZzQkTP0R8wR2fnuYMN+jSz3RgKRW57eqCrgDjnHopBMGfFa+vzOk6Nz8qd2 /f2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T9iZEwFJ; 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 i3sor508752pjt.5.2019.08.14.11.47.27 for (Google Transport Security); Wed, 14 Aug 2019 11:47:27 -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=T9iZEwFJ; 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=sfKXX+o4Qp2/I5oLyNwYp5frrb8P6SiEjD+Gvi5BkT0=; b=T9iZEwFJF+TJKY0hHgQxpaN4a7p8bUuNIhxCNxLQu39fiS3b6qpIngIlGx0/PsKPxL 5BhpUZFNY4Y1uicrCiOl/ecaqtix8bpnBrPTriSTl+FU6MvKZhD40K1X9tpi1TJvUPHm ZcAJO5JN/u2+RtuXPVeqCXTc3hi688nlSKe/ziB84VAnL9rED7HxiWWfh4RFYEADZwot SFUn3RzcO/DdUz0dukUuu57PdnIWrfbgtu4pdiouqY8sD6tKNiQFqbIJ2WGGR0Ld88tt +rvamYv9LUD5NWc/6TOtfO5PHTojq78/3MAmbMdtuZTQZHWhgnPjE3bkqg75GhB2aJe5 AbPQ== 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=sfKXX+o4Qp2/I5oLyNwYp5frrb8P6SiEjD+Gvi5BkT0=; b=HgMBImbMUtVngoH8bjPBGZZviyNJzI+qOeIl/1AWbWjLR4EVb5+XC2IdDFJ59XE0LM rXSgtWvusekziFkWL1TopZV4p7mcGow90nDjUXZfP+WjmN59BTCpZQKsTcbndHCrB2/u ZcZFmVQPxfLOiw3RAxHmt/YNVvdc7bhQLEXQNkfcdFpJFUeZb6dZWlfA/AH/QCHzCBKp jQE17q2vcYKzPZl5bCVMVl0wOfH5bLSx1TrnoO3/GHyGrKGkj3PkS8Uw90wemMCl7vcX MCkXV7KLg7x24shTbpMt5mzWWCsuqgYWOFUsMDXCJkev8QTRcN8dha7O5nWaLmu1FgP8 m1oQ== X-Gm-Message-State: APjAAAUXdCCLMyhJ4fZ9BRlizcvFTa8RyMzqAika5zoA95Zp85/VdYfQ 3drF33D1dLQsKfJsSOjU61VLZd39 X-Google-Smtp-Source: APXvYqyti+/OTVYfzLGL5f/MtTZ6Q0iILK/4POxjmbTxxzDN0spGBwaiT/XdSekW3R43JNlWtf0cCw== X-Received: by 2002:a17:90a:5288:: with SMTP id w8mr1079972pjh.61.1565808446871; Wed, 14 Aug 2019 11:47:26 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id y16sm610855pfc.36.2019.08.14.11.47.25 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 14 Aug 2019 11:47:26 -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: [RESEND][PATCH v3 13/26] drm: kirin: Reanme dc_ops to kirin_drm_data Date: Wed, 14 Aug 2019 18:46:49 +0000 Message-Id: <20190814184702.54275-14-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190814184702.54275-1-john.stultz@linaro.org> References: <20190814184702.54275-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 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 3ad1e290bf58..acae2815eded 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 bfe0505ac4a0..60c164623f56 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c @@ -28,12 +28,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; @@ -67,7 +67,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; @@ -98,7 +98,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); @@ -196,8 +196,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; } @@ -215,13 +215,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__ */