From patchwork Mon Aug 19 23:03:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 11102315 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3575D1398 for ; Mon, 19 Aug 2019 23:03:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F4ED22CEC for ; Mon, 19 Aug 2019 23:03:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F4ED22CEC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF1BB6E479; Mon, 19 Aug 2019 23:03:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id E031B6E468 for ; Mon, 19 Aug 2019 23:03:45 +0000 (UTC) Received: by mail-pg1-x543.google.com with SMTP id o13so2026693pgp.12 for ; Mon, 19 Aug 2019 16:03:45 -0700 (PDT) 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=OZ+SrFkbIczithscsJHG1FWCWpuh75dF4XhR676L94A=; b=ALAwr1oe7Ew+B4vq/1zTVRmOMeklOpu2ip/iJwV9db2iBrKOB4rJup0YqO8biX9hHH +HqslLKLRndkAVIrizBUUHbS3ECzxRZuQi8o0yQa/9BFaJicUUXJanvwcj3CWWfl/zpx zR91+PjG2HKPa4bjOz55tUoTwqPymmNogWnXHl4avLLpVd5LcBkpsKxZusZvECU8wjvf u9oKO7V29qoJZcfQDWg1ZAOZQlkMLLw5ne72m3h5nOrOEFqmj4gHODrgXKx8MoAGl+pk wPKNQyyn24IQ4nYLeUPdiOZSV8mj+4EgRG3Z6YMzF6kMCpys1C8vy4zS5Y/F3mSDXnsD 6JYw== X-Gm-Message-State: APjAAAUQNg8Nf1JkglfGaGiYQINdzRcG0FdJJUbHsvnnoLLkOVmMvAnZ ggHHkOyIh8vJIhscWwBvrv/jkg== X-Google-Smtp-Source: APXvYqwOSNCDkrQVdRJH+eZGt+dB6nlpK3ZY8rde9Pp1Qt5pUgXfn7JPXbYf/ACC4arQgoukgOo6Fw== X-Received: by 2002:aa7:9907:: with SMTP id z7mr25847365pff.13.1566255824022; Mon, 19 Aug 2019 16:03:44 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id j15sm17256509pfr.146.2019.08.19.16.03.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 16:03:43 -0700 (PDT) From: John Stultz To: lkml Subject: [PATCH v4 12/25] drm: kirin: Reanme dc_ops to kirin_drm_data Date: Mon, 19 Aug 2019 23:03:08 +0000 Message-Id: <20190819230321.56480-13-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190819230321.56480-1-john.stultz@linaro.org> References: <20190819230321.56480-1-john.stultz@linaro.org> X-Mailman-Original-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=OZ+SrFkbIczithscsJHG1FWCWpuh75dF4XhR676L94A=; b=mjobgqYQxYKyt0g7Fn2i+HuvXGBmy4AGRO8d7Lu3ApfY/9UOIR4i8FXL4AMyKz11ZT KlHYrk+3M6lRB26WOYHdkTAWOFO8L5GKlREj44pqANrdBEmIvDYTgEMwUwyXi/Vybpb3 KaR+KrhyaZa5/VyryYAlAS28YfpB/eW2GyMyyas0VVNRGaxC2//WckLHr0aNYwgluyE5 +7FjOjDh676cVeKl7tOnEAqeV2VFgtjcEgbruW29jWfuG+3tq4dVg3Zh1AZAJzCh/q8b IBfWBZMBea5u+UTq62wIq2XHnNuc3oseTUgP0FsJIZ2FFbFRGyEh8w2BpmenJ0d302G9 Aktg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Xu YiPing , David Airlie , dri-devel , Xinliang Liu , Rongrong Zou , Sam Ravnborg MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index d3088d374f8b..6ff8417943c6 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__ */