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: 171741 Delivered-To: patches@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp3595974ily; Mon, 19 Aug 2019 16:03:44 -0700 (PDT) X-Received: by 2002:aa7:96bd:: with SMTP id g29mr27591392pfk.10.1566255824402; Mon, 19 Aug 2019 16:03:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566255824; cv=none; d=google.com; s=arc-20160816; b=Z64VaUIegiXhfa3m8tPiOAP8favXvDDHVUMQdjgIlp3Bqvo/5EEDe2kgj3cOrlhVRj pGonbRih8oBjCs/nVvQ2JSY4obXhImgf/6/DYIoExp/pRYMrRTSqgHURDCY7ovus/iQT 5KzQgjI9Vjs9BjZlXKKVCDQ4qHXhpbVb20wpzGCiBZe80gMXJ4YiwBw/g66YGf8wruuO xr4IPIUJW+MkoR6HWdmYSZPD4MKPvXEoBKy80IWOHqrbcjWMXhHNGrdQxoG64tMavras NFFtqxV0iDgVHUKJPquqml+0RE40HqidY9woCgLCYTg/eo2BWQFX67xgcammrxhys/K3 W+yg== 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=OZ+SrFkbIczithscsJHG1FWCWpuh75dF4XhR676L94A=; b=aq8NsTjNcsAk0OjeVNYOMQuVnCynojJSz3QdwIlcdiXgHfTL41ZJau7UZopFwqEFp2 N1Y+jL+XWgsa90i89jH275pmIy6yGACR+n1vIxpgZp0EvqFSVBjE8y8sEisJcgD3Xcd2 MulsgLuJTrpHpPjlEcS5zhy4tZbMTqifGFpA2TBeaHgyJvDw/GTblLRj/xPa0IIyHJuu AY+Ekb5D09B42gIvhkR413lRzNnotYqA0gSx0GnHpZMixr9lDpByPBWcT7+/SqUOt888 JLj/ljuFpDSSXBlGEqbW/jfsQRJuXR2ylme2ejxK/6REoWT7Qhm8O2QWozA7KsR9rCuZ +1Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mjobgqYQ; 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 e124sor2044633pfa.50.2019.08.19.16.03.44 for (Google Transport Security); Mon, 19 Aug 2019 16:03:44 -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=mjobgqYQ; 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=OZ+SrFkbIczithscsJHG1FWCWpuh75dF4XhR676L94A=; b=mjobgqYQxYKyt0g7Fn2i+HuvXGBmy4AGRO8d7Lu3ApfY/9UOIR4i8FXL4AMyKz11ZT KlHYrk+3M6lRB26WOYHdkTAWOFO8L5GKlREj44pqANrdBEmIvDYTgEMwUwyXi/Vybpb3 KaR+KrhyaZa5/VyryYAlAS28YfpB/eW2GyMyyas0VVNRGaxC2//WckLHr0aNYwgluyE5 +7FjOjDh676cVeKl7tOnEAqeV2VFgtjcEgbruW29jWfuG+3tq4dVg3Zh1AZAJzCh/q8b IBfWBZMBea5u+UTq62wIq2XHnNuc3oseTUgP0FsJIZ2FFbFRGyEh8w2BpmenJ0d302G9 Aktg== 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=eN0rpxp+wIyPOYmoBBKmR8x61WsFYD4oIUGnCKjz1xUeD89HId6DvcV+Y8+p6RDvev Tv7XR+xINyf+pLLLMgca5JGZ3XU0AXPKRHiRULw9eRdD+0jw+ich13kCcgpMk1Bbrxhk gWReEPrQxUwzLVYzfv8MIg8LAo5MbtjIWMH5li9jfsfy1i9D82j7wDMpN3711mB0Mfof kJ5TfNbL/2D0H2s1qLXdHxQ5CVI+VbLfht3yPfbSPecoLBO1Yw7/RfZT8wdf1S1HYBpZ INGPLDo9Aiuo2YlgA583sk8bjw37WzaQR3X+pa+ZAq35EZncULbDcjXaZb+HXtLSjx15 hf5w== X-Gm-Message-State: APjAAAVM/GRyGw1FKRw+/vseA8S3PruvlMMNK7XDlvCqRQKaDyMG3IDd KUNnAUWizn/3y5qQ+91Ki13CG/nX 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) Return-Path: 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 Cc: Xu YiPing , Rongrong Zou , Xinliang Liu , David Airlie , Daniel Vetter , dri-devel , Sam Ravnborg , John Stultz 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> 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 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__ */