Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2275110pxb; Mon, 20 Sep 2021 17:23:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxguF7/FHIxIG66SB+c+qV02jYQIYWPvTGfwillatYqrSlklBCRs87+3EA/sqGD6P/+j4Ju X-Received: by 2002:a05:6402:16dc:: with SMTP id r28mr32228326edx.339.1632183837206; Mon, 20 Sep 2021 17:23:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632183837; cv=none; d=google.com; s=arc-20160816; b=hKUPDUUzGM/63sf4Z6gsxSpTeCLekLMNHUlGHm3KwRobTlJcM+RMH8kqZiDMrPyHvV XbJPecag2GWGPUx7vtt0b2rmfrmObVUP/BCIrrnTnrsRqO5tkyIq7QhwkjEFXe81vLFH 5TciVbZgXqAklswRqJ8S/cD3D5vb+VSB1vNGm2/llzaVAfi1X2QiczbHVo4ZKO4WrnIu +qKTU1BhHTzfvKq5tv0WK6R48H0MKJU8N60OPqHTSek2N5evL5ytN0qzUWul+MXHirqp GtC0b0Ml58LMBYPwzBTb0JtIbA0fsREMozXEzXfFT2j3DrVa52ieXaTf8xYvctML6hqH FUxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=1mHJ52EIIcVh+tTroLLcAMQrIJo+MsAhO3rCWlmIa/8=; b=0Be90UCxaF1eS/o/OSfBNqTBevnqyNhIHYD9ijSDlL7B56q7r+/ThVH80fXtpJooMV 81ev7/GV07VjV3cUIjL7WkyrTOQhEwtgcB7op9D0FmOcV0kiIypARKe67c0X1sO0y4bO 36aOJOMMAy0X5oSjZNbhUxbvcKWedeLdZIpx4BxL/XQ/7aT3u2vhEN7TXxSojGZOg4pR +SJy5s8hOH4o5uVTEFzkOWEaMKCJCbzR7jz3zzz6QRKU+DRChXesCIWbEDg0wL+ciIOq X3pdh6S4l49ovxogOagOpmCm8jMf//e8luenwBHdSehIBR5G2606GGl9Q94wsPyjPhs5 RV0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si16776527ejj.689.2021.09.20.17.23.28; Mon, 20 Sep 2021 17:23:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235360AbhITNfY (ORCPT + 99 others); Mon, 20 Sep 2021 09:35:24 -0400 Received: from foss.arm.com ([217.140.110.172]:47756 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232938AbhITNfU (ORCPT ); Mon, 20 Sep 2021 09:35:20 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4306612FC; Mon, 20 Sep 2021 06:33:53 -0700 (PDT) Received: from [192.168.1.179] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ECCC83F882; Mon, 20 Sep 2021 06:33:51 -0700 (PDT) Subject: Re: [PATCH 5/9] drm/panfrost: simplify getting .driver_data To: Wolfram Sang , linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Rob Herring , Tomeu Vizoso , Alyssa Rosenzweig , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> <20210920090522.23784-6-wsa+renesas@sang-engineering.com> From: Steven Price Message-ID: Date: Mon, 20 Sep 2021 14:33:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210920090522.23784-6-wsa+renesas@sang-engineering.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/09/2021 10:05, Wolfram Sang wrote: > We should get 'driver_data' from 'struct device' directly. Going via > platform_device is an unneeded step back and forth. > > Signed-off-by: Wolfram Sang > --- Reviewed-by: Steven Price I'll push this to drm-misc-next. Thanks, Steve > > Build tested only. buildbot is happy. > > drivers/gpu/drm/panfrost/panfrost_device.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c > index bd9b7be63b0f..fd4309209088 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_device.c > +++ b/drivers/gpu/drm/panfrost/panfrost_device.c > @@ -400,8 +400,7 @@ void panfrost_device_reset(struct panfrost_device *pfdev) > #ifdef CONFIG_PM > int panfrost_device_resume(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct panfrost_device *pfdev = platform_get_drvdata(pdev); > + struct panfrost_device *pfdev = dev_get_drvdata(dev); > > panfrost_device_reset(pfdev); > panfrost_devfreq_resume(pfdev); > @@ -411,8 +410,7 @@ int panfrost_device_resume(struct device *dev) > > int panfrost_device_suspend(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct panfrost_device *pfdev = platform_get_drvdata(pdev); > + struct panfrost_device *pfdev = dev_get_drvdata(dev); > > if (!panfrost_job_is_idle(pfdev)) > return -EBUSY; >